2019-06-12 21:56:55 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2020-01-11 17:21:31 +01:00
|
|
|
|
#nullable enable
|
2019-06-12 21:56:55 +02:00
|
|
|
|
namespace Capnp
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a Cap'n Proto message. Actually a lightweight wrapper struct around a read-only list of memory segments.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public struct WireFrame
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The message segments
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly IReadOnlyList<Memory<ulong>> Segments;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Constructs a message from a list of segments.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public WireFrame(IReadOnlyList<Memory<ulong>> segments)
|
|
|
|
|
{
|
|
|
|
|
Segments = segments;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-01-11 17:21:31 +01:00
|
|
|
|
#nullable restore
|