Capnp.Net.Runtime
Generic implementation, based on a wrapper around .
The will be set by the Deserialize method.
Sets the State property.
deserializer state
Performs a deep copy from State to given state.
serializer state
Provides functionality to construct domain objects from .
Constructs a domain object from a given deserializer state.
Type of domain object to construct. Must be one of the following:
- Type implementing . The type must must have a public parameterless constructor.
- A capability interface ( for further explanation)
- whereby T is one of the things listed here.
This exception gets thrown when a Cap'n Proto object could not be deserialized correctly.
Constructs an instance
Constructs an instance with message and inner exception
Implements the heart of deserialization. This stateful helper struct exposes all functionality to traverse serialized data.
Although it is public, you should not use it directly. Instead, use the reader, writer, and domain class adapters which are produced
by the code generator.
A wire message is essentially a collection of memory blocks.
Index of the segment (into the Segments property) which this state currently refers to.
Word offset within the current segment which this state currently refers to.
Context-dependent meaning: Usually the number of bytes traversed until this state was reached, to prevent amplification attacks.
However, if this state is of Kind == ObjectKind.Value (an artificial category which will never occur on the wire but is used to
internally represent lists of primitives as lists of structs), it contains the primitive's value.
If this state currently represents a list, the number of list elements.
If this state currently represents a struct, the struct's data section word count.
If this state currently represents a struct, the struct's pointer section word count.
The kind of object this state currently represents.
The capabilities imported from the capability table. Only valid in RPC context.
Current segment (essentially Segments[CurrentSegmentIndex]
Constructs a state representing a message root object.
the message
Implicitly converts a serializer state into a deserializer state.
The conversion is cheap, since it does not involve copying any payload.
The serializer state to be converted
Constructs a state representing the given value. This kind of state is artificial and beyond the Cap'n Proto specification.
We need it to internally represent list of primitive values as lists of structs.
Increments the number of bytes traversed and checks the results against the traversal limit.
Amount to increase the traversed bytes
Memory span which represents this struct's data section (given this state actually represents a struct)
If this state represents a list of primitive values, returns the raw list data.
Interprets a pointer within the current segment and mutates this state to represent the pointer's target.
word offset relative to this.Offset within current segment
offset negative or out of range
invalid pointer data or traversal limit exceeded
Interprets a pointer within the current segment as capability pointer and returns the according low-level capability object from
the capability table. Does not mutate this state.
Offset relative to this.Offset within current segment
the low-level capability object
offset negative or out of range
capability table not set
not a capability pointer or invalid capability index
Reads a slice of up to 64 bits from this struct's data section, starting from the specified bit offset.
The slice must be aligned within a 64 bit word boundary.
Start bit offset relative to the data section, little endian
numbers of bits to read
the data
non-aligned access
bitOffset exceeds the data section
this state does not represent a struct
Decodes a pointer from this struct's pointer section and returns the state representing the pointer target.
It is valid to specify an index beyond the pointer section, in which case a default state (representing the "null object")
will be returned. This is to preserve upward compatibility with schema evolution.
Index within the pointer section
the target state
this state does not represent a struct,
invalid pointer, or traversal limit exceeded
Given this state represents a list (of anything), returns a ListDeserializer to further decode the list content.
state does not represent a list
Given this state represents a list of pointers, returns a ListOfCapsDeserializer for decoding it as list of capabilities.
Capability interface
state does not represent a list of pointers
Convenience method. Given this state represents a struct, decodes text field from its pointer table.
index within this struct's pointer table
default text to return of pointer is null
the decoded text, or defaultText (which might be null)
negative index
state does not represent a struct, invalid pointer,
non-list-of-bytes pointer, traversal limit exceeded
Convenience method. Given this state represents a struct, decodes a list deserializer field from its pointer table.
index within this struct's pointer table
the list deserializer instance
negative index
state does not represent a struct, invalid pointer,
non-list pointer, traversal limit exceeded
Convenience method. Given this state represents a struct, decodes a capability list field from its pointer table.
Capability interface
index within this struct's pointer table
the capability list deserializer instance
negative index
state does not represent a struct, invalid pointer,
non-list-of-pointers pointer, traversal limit exceeded
Convenience method. Given this state represents a struct, decodes a list of structs field from its pointer table.
Struct target representation type
index within this struct's pointer table
constructs a target representation type instance from the underlying deserializer state
the decoded list of structs
negative index
state does not represent a struct, invalid pointer,
non-list-of-{structs,pointers} pointer, traversal limit exceeded
Convenience method. Given this state represents a struct, decodes a struct field from its pointer table.
Struct target representation type
index within this struct's pointer table
constructs a target representation type instance from the underlying deserializer state
the decoded struct
negative index
state does not represent a struct, invalid pointer,
non-struct pointer, traversal limit exceeded
Given this state represents a capability, returns its index into the capability table.
Given this state represents a struct, decodes a capability field from its pointer table.
Capability interface
index within this struct's pointer table
debugging aid
debugging aid
debugging aid
capability instance or null if pointer was null
negative index
state does not represent a struct, invalid pointer,
non-capability pointer, traversal limit exceeded
Given this state represents a struct, decodes a capability field from its pointer table and
returns it as bare (generic) proxy.
index within this struct's pointer table
capability instance or null if pointer was null
negative index
state does not represent a struct, invalid pointer,
non-capability pointer, traversal limit exceeded
Given this state represents a capability, wraps it into a proxy instance for the desired interface.
Capability interface
capability instance or null if pointer was null
negative index
state does not represent a capability
This SerializerState specialization provides functionality to build arbitrary Cap'n Proto objects without requiring the schema code generator.
Constructs an unbound instance.
Constructs an instance and binds it to the given .
message builder
Constructs an instance, binds it to a dedicated message builder, and initializes the capability table for usage in RPC context.
Converts any to a DynamicSerializerState instance, which involves deep copying the object graph.
The deserializer state to convert
Links a sub-item (struct field or list element) of this state to another state. Usually, this operation is not necessary, since objects are constructed top-down.
However, there might be some advanced scenarios where you want to reference the same object twice (also interesting for designing amplification attacks).
The Cap'n Proto serialization intrinsically supports this, since messages are object graphs, not trees.
If this state describes a struct: Index into this struct's pointer table.
If this state describes a list of pointers: List element index.
state to be linked
Whether to deep copy the target state if it belongs to a different message builder than this state.
is null
out of range
- This state does neither describe a struct, nor a list of pointers
- Another state is already linked to the specified position (sorry, no overwrite allowed)
- This state and belong to different message builder, and is false
Links a sub-item (struct field or list element) of this state to a capability.
If this state describes a struct: Index into this struct's pointer table.
If this state describes a list of pointers: List element index.
capability index inside the capability table
- This state does neither describe a struct, nor a list of pointers
- Another state is already linked to the specified position (sorry, no overwrite allowed)
Determines the underlying object to be a struct.
Desired size of the struct's data section, in words
Desired size of the struct's pointer section, in words
The object type was already set to something different
Determines the underlying object to be a list of (primitive) values.
Element size in bits, must be 0 (void), 1 (bool), 8, 16, 32, or 64
Desired element count
The object type was already set to something different
outside allowed range,
negative or exceeding 2^29-1
Determines the underlying object to be a list of pointers.
Desired element count
The object type was already set to something different
negative or exceeding 2^29-1
Determines the underlying object to be a list of structs (fixed-width compound list).
Desired element count
Desired size of each struct's data section, in words
Desired size of each struct's pointer section, in words
The object type was already set to something different
negative, or total word count would exceed 2^29-1
Constructs the underlying object from the given representation.
Object representation. Must be one of the following:
- An instance implementing
- null
- A
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- A
]]>
- Another
- Another
- Low-level capability object ()
- Proxy object ()
- Skeleton object ()
- Capability interface implementation
- A
]]>
whereby each list item is one of the things listed here.
Implements an empty .
Always throws an .
Ignored
Always 0.
Returns an empty enumerator.
ListDeserializer specialization for empty lists.
Always ListKind.ListOfEmpty (despite the fact the empty list != List(Void)
Returns am empty .
Element ype
Ignored
Returns an empty ]]>
/>.
Returns an empty ]]>
/>.
Returns an empty ]]>
/>.
Returns an empty ]]>
.
Returns an empty ]]>
.
Returns an empty ]]>
.
Returns an empty ]]>
/>.
Returns an empty ]]>
.
Returns an empty ]]>
.
Returns an empty string.
Returns an empty ]]>
.
Returns an empty ]]>
.
Returns an empty ]]>
.
The FramePump handles sending and receiving Cap'n Proto messages over a stream. It exposes a Send method for writing frames to the stream, and an
event handler for processing received frames. It does not fork any new thread by itself, but instead exposes a synchronous blocking Run method that
implements the receive loop. Invoke this method in the thread context of your choice.
Constructs a new instance for given stream.
The stream for message I/O.
If you intend to receive messages, the stream must support reading (CanRead).
If you intend to send messages, the stream must support writing (CanWrite).
is null.
Disposes this instance and the underlying stream. This will also cause the Run method to return.
Event handler for frame reception.
Sends a message over the stream.
Message to be sent
The underlying stream does not support writing.
The message does not provide at least one segment, or one of its segments is empty.
An I/O error occurs.
This instance or stream is diposed.
Whether the pump is currently waiting for data to receive.
Synchronously runs the frame reception loop. Will only return after calling Dispose() or upon error condition.
The method does not propagate EndOfStreamException or ObjectDisposedException to the caller, since these conditions are considered
to be part of normal operation. It does pass exceptions which arise due to I/O errors or invalid data.
The underlying stream does not support reading or is already closed.
Encountered Invalid Framing Data
Received a message with too many or too big segments, probably dues to invalid data.
An I/O error occurs.
Supports the deserialization of Cap'n Proto messages from a stream (see https://capnproto.org/encoding.html#serialization-over-a-stream).
Packing and compression cannot be handled yet.
Deserializes a message from given stream.
The stream to read from
The deserialized message
is null.
The stream does not support reading, is null, or is already closed.
The end of the stream is reached.
The stream is closed.
An I/O error occurs.
Encountered invalid framing data, too many or too large segments
Too many or too large segments, probably due to invalid framing data.
Deserializes the next Cap'n Proto message from given stream.
The stream to read from
The message
This interface is intended to be implemented by schema-generated domain classes which support deserialization from
a and serialization to a .
Serializes the implementation's current state to a serializer state.
Target serializer state
Deserializes the implementation's state from a deserializer state.
Source deserializer state
Implements a segment allocation policy for Cap'n Proto building messages.
Currently allocated segments.
Attempts to allocate a memory block. The first allocation attempt is made inside the segment specified by .
If that segment does not provide enough space or does not exist, further actions depend on the flag.
If that flag is true, allocation will fail (return false). Otherwise, the allocation shall scan existing segments for the requested amount of space,
and create a new segment if none provides enough space.
Number of words to allocate
Index of preferred segment wherein the block should be allocated
Position of allocated memory block (undefined in case of failure)
Whether the segment specified by is mandatory
Whether allocation was successful
An implementations of this interface represents a struct which is being deserialized from a Cap'n Proto object.
Reads a slice of up to 64 bits from this struct's data section, starting from the specified bit offset.
The slice must be aligned within a 64 bit word boundary.
Start bit offset relative to the data section, little endian
numbers of bits to read
the data
non-aligned access
bitOffset exceeds the data section
this state does not represent a struct
An implementations of this interface represents a struct which is being serialized as Cap'n Proto object.
Writes data (up to 64 bits) into the underlying struct's data section.
The write operation must be aligned to fit within a single word.
Start bit relative to the struct's data section, little endian
Number of bits to write
Data bits to write
The object was not determined to be a struct
The data slice specified by and
is not completely within the struct's data section, misaligned, exceeds one word, or is negative
The struct's data section as memory span.
Base class for interpreting a as List(T).
Underlying deserializer state
This list's element count
The list's element category
Represents this list by applying a selector function to each element's deserializer state.
This operator is only supported by certain specializations.
Target element type
Selector function
The desired representation
Represents this list as a list of lists.
The list of lists representation, each element being a on its own.
If this kind of list cannot be represented as list of lists (because it is a list of non-pointers)
Represents this list as a list of capabilities.
Capability interface
Capability list representation
If this kind of list cannot be represented as list of capabilities (because it is a list of non-pointers)
If does not qualify as capability interface.
Represents this list as n-dimensional list of T, with T being a primitive type.
Element type, must be primitive
Number of dimensions
The desired representation as >]]>
is less than or equal to 0
If this list cannot be represented in the desired manner.
Represents this list as n-dimensional list of T, with T being any type.
Element type
Number of dimensions
Selector function which constructs an instance of from a
The desired representation as >]]>
is null.
is less than or equals 0.
If this list cannot be represented in the desired manner.
Represents this list as n-dimensional list of enums.
Enum type
Number of dimensions
Cast function which converts ushort value to enum value
The desired representation as >]]>
is null.
is less than or equals 0.
If this list cannot be represented in the desired manner.
Represents this list as n-dimensional List(...List(Void))
Number of dimensions
The desired representation as >]]>
is less than or equals 0
If this list cannot be represented in the desired manner.
Represents this list as "matrix" (jagged array) with primitive element type.
Element type, must be primitive
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Data).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as "matrix" (jagged array) with complex element type.
Element type
Selector function which constructs an instance of from a
The desired representation
is null.
If this list cannot be represented in the desired manner.
Represents this list as "matrix" (jagged array) of enum-typed elements.
Enum type
Cast function which converts ushort value to enum value
The desired representation
is null.
If this list cannot be represented in the desired manner.
Represents this list as 3-dimensional jagged array with primitive element type.
Element type, must be primitive
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as 3-dimensional jagged array with complex element type.
Element type
Selector function which constructs an instance of from a
The desired representation
is null.
If this list cannot be represented in the desired manner.
Represents this list as 3-dimensional jagged array of enum-typed elements.
Enum type
Cast function which converts ushort value to enum value
The desired representation
is null.
If this list cannot be represented in the desired manner.
Represents this list as list of enum-typed elements.
Enum type
Cast function which converts ushort value to enum value
The desired representation
is null.
If this list cannot be represented in the desired manner.
Represents this list as List(Void), which boils down to returning the number of elements.
The List(Void) representation which is nothing but the list's element count.
Represents this list as List(List(Void)), which boils down to returning a list of element counts.
A list of integers whereby each number equals the sublist's element count.
If this list cannot be represented in the desired manner.
Represents this list as List(List(List(Void))).
The List(List(List(Void))) representation which is in turn a 2-dimensional jagged array of element counts.
If this list cannot be represented in the desired manner.
Represents this list as List(Text). For representing it as Text, use .
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as Text. For representing it as List(Text), use .
Did you notice that the naming pattern is broken here? For every other CastX method, X depicts the element type.
CastX actually means "represent this list as list of X". Logically, the semantics of CastText should be the semantics
implemented by CastText2. And this method's name should be "CastChar". This wouldn't be accurate either, since a string
is semantically more than the list of its characters. Trying to figure out a consistent naming pattern, we'd probably
end up in less concise method names (do you have a good suggestion?). Considering this and the fact that you probably
won't use these methods directly (because the code generator will produce nice wrappers for you) it seems acceptable to
live with the asymmetric and somewhat ugly naming.
The decoded text
If this list cannot be represented in the desired manner.
Represents this list as List(Bool).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Int8).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(UInt8).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Int16).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(UInt16).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Int32).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(UInt32).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Int64).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(UInt64).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Float32).
The desired representation
If this list cannot be represented in the desired manner.
Represents this list as List(Float64).
The desired representation
If this list cannot be represented in the desired manner.
Enumerates the list element categories which are defined by Cap'n Proto.
List(Void)
List(Bool)
List(Int8) or List(UInt8)
List(Int16), List(UInt16), or List(Enum)
List(Int32), List(UInt32), or List(Float32)
List(Int64), List(UInt64), or List(Float64)
A list of pointers
A list of fixed-size composites (i.e. structs)
ListDeserializer specialization for a List(Bool).
Always ListKind.ListOfBits
Gets the element at given index.
Element index
Element value
is out of range.
Implements
Return this
Always throws since it is not intended to represent a list of bits differently.
SerializerState specialization for a List(Bool).
Gets or sets the element at given index.
Element index
Element value
List was not initialized, or attempting to overwrite a non-null element.
is out of range.
This list's element count.
Initializes this list with a specific size. The list can be initialized only once.
List element count
The list was already initialized
is negative or greater than 2^29-1
Initializes the list with given content.
List content. Can be null in which case the list is simply not initialized.
The list was already initialized
More than 2^29-1 items.
Implements
ListDeserializer specialization for a list of capabilities.
Capability interface
Returns the capability at given index.
Element index
The capability at given index (in terms of its proxy instance)
Always ListKind.ListOfPointers
Always throws , since it is not intended to convert a capability list to anything else.
Implements .
SerializerState specialization for a list of capabilities.
Capability interface
Constructs an instance.
does not quality as capability interface.
The implementation might attempt to throw this exception earlier in the static constructor (during type load). Currently it doesn't
because there is a significant risk of messing something up and ending with a hard-to-debug .
Gets or sets the capability at given element index.
Element index
Proxy object of capability at given element index
List was not initialized, or attempting to overwrite an already set element.
is out of range.
Initializes this list with a specific size. The list can be initialized only once.
List element count
The list was already initialized
is negative or greater than 2^29-1
Initializes the list with given content.
List content. Can be null in which case the list is simply not initialized.
The list was already initialized
More than 2^29-1 items.
This list's element count.
Implements .
ListDeserializer specialization for List(Void).
Returns a DeserializerState representing an element at given index.
This is always the null object, since Void cannot carry any data.
Element index
default(DeserializerState)
is out of range.
Always ListKind.ListOfEmpty
Applies a selector function to each element.
Trivia: Since each element is the null object, the selector function always gets fed with a null object.
Element target type
Selector function
The desired representation
Implements .
SerializerState specialization for List(Void).
This list's element count.
Initializes this list with a specific size. The list can be initialized only once.
List element count
The list was already initialized
is negative or greater than 2^29-1
ListDeserializer specialization for List(T) when T is unknown (generic), List(Data), List(Text), and List(List(...)).
Always ListKind.ListOfPointers
Gets the DeserializerState representing the element at given index.
Element index
DeserializerState representing the element at given index
Implements .
Applies a selector function to each element.
Element target type
Selector function
The desired representation
Interprets this instance as List(List(...)).
The desired representation. Since it is evaluated lazily, type conflicts will not happen before accessing the resulting list's elements.
Interprets this instance as a list of capabilities.
Capability interface
The desired representation. Since it is evaluated lazily, type conflicts will not happen before accessing the resulting list's elements.
SerializerState specialization for List(T) when T is unknown (generic), List(Data), List(Text), and List(List(...)).
SerializerState which represents the element type
Gets or sets the element at given index.
Element index
Serializer state representing the desired element
List was not initialized, or attempting to overwrite a non-null element.
is out of range.
This list's element count.
Implements .
Initializes this list with a specific size. The list can be initialized only once.
List element count
The list was already initialized
is negative or greater than 2^29-1
Initializes the list with given content.
Item type
List content. Can be null in which case the list is simply not initialized.
Serialization action to transfer a particular item into the serializer state.
The list was already initialized
More than 2^29-1 items.
ListDeserializer specialization for List(Int*), List(UInt*), List(Float*), and List(Enum).
List element type
One of ListOfBytes, ListOfShorts, ListOfInts, ListOfLongs.
Returns the element at given index.
Element index
Element value
is out of range.
Always throws because this specialization can never represent a List(bool).
Attempts to interpret this instance as List(UInt8).
The desired representation
Element size is different from 1 byte.
Attempts to interpret this instance as List(Int8).
The desired representation
Element size is different from 1 byte.
Attempts to interpret this instance as List(UInt16).
The desired representation
Element size is different from 2 bytes.
Attempts to interpret this instance as List(Int16).
The desired representation
Element size is different from 2 bytes.
Attempts to interpret this instance as List(UInt32).
The desired representation
Element size is different from 4 bytes.
Attempts to interpret this instance as List(Int32).
The desired representation
Element size is different from 4 bytes.
Attempts to interpret this instance as List(UInt64).
The desired representation
Element size is different from 8 bytes.
Attempts to interpret this instance as List(Int64).
The desired representation
Element size is different from 8 bytes.
Attempts to interpret this instance as List(Float32).
The desired representation
Element size is different from 4 bytes.
Attempts to interpret this instance as List(Float64).
The desired representation
Element size is different from 8 bytes.
Attempts to interpret this instance as List(U) whereby U is a struct, applying a selector function to each element.
Selector function
The desired representation
Attempts to interpret this instance as Text and returns the string representation.
The decoded string
Element size is different from 1 byte.
Implements .
SerializerState specialization for List(Int*), List(UInt*), List(Float*), and List(Enum).
List element type, must be primitive. Static constructor will throw if the type does not work.
Gets or sets the value at given index.
Element index
Element value
This list's element count.
Initializes this list with a specific size. The list can be initialized only once.
List element count
The list was already initialized
is negative or greater than 2^29-1
Initializes the list with given content.
List content. Can be null in which case the list is simply not initialized.
The list was already initialized
More than 2^29-1 items.
Implements .
ListDeserializer specialization for List(T) when T is a known struct (i.e. a list of fixed-width composites).
Always returns ListKind.ListOfStructs
.
Returns the deserializer state at given index.
Element index
Element deserializer state
is out of range.
Traversal limit reached
Converts this list to a different representation by applying an element selector function.
Target type after applying the selector function
The selector function
The new list representation
Implements .
SerializerState specialization for List(T) when T is a known struct (i.e. a list of fixed-width composites).
SerializerState which represents the struct type
Returns the struct serializer a given index.
Element index
The struct serializer
This list's element count.
Implementation of />
Initializes this list with a specific size. The list can be initialized only once.
List element count
Initializes the list with given content.
Item type
List content. Can be null in which case the list is simply not initialized.
Serialization action to transfer a particular item into the serializer state.
The list was already initialized
More than 2^29-1 items.
SerializerState specialization for List(Text)
Gets or sets the text at given index. Once an element is set, it cannot be overwritten.
Element index
List is not initialized
is out of range.
UTF-8 encoding exceeds 2^29-2 bytes
This list's element count.
Implementation of />
Initializes this list with a specific size. The list can be initialized only once.
List element count
The list was already initialized
is negative or greater than 2^29-1
Initializes the list with given content.
List content. Can be null in which case the list is simply not initialized.
The list was already initialized
More than 2^29-1 items, or the UTF-8 encoding of an individual string requires more than 2^29-2 bytes.
Runtime logging features rely on
Gets or sets the logger factory which will be used by this assembly.
Creates a new ILogger instance, using the LoggerFactory of this class.
The type using the logger
The logger instance
Entry point for building Cap'n Proto messages.
Constructs an instance using a custom segment allocator and reserves space for the root pointer.
Segment allocator implementation type
Constructs an instance using the default segment allocator and reserves space for the root pointer.
Default segment size,
Creates a new object inside the message.
Serializer state specialization
Serializer state instance representing the new object
Gets or sets the root object. The root object must be set exactly once per message.
Setting it manually is only required (and allowed) when it was created with .
Creates an object and sets it as root object.
Serializer state specialization
Serializer state instance representing the new object
Returns the wire representation of the built message.
Initializes the capability table for using the message builder in RPC context.
Returns this message builder's segment allocator.
The different kinds of Cap'n Proto objects.
Despite this is a [Flags] enum, it does not make sense to mutually combine literals.
The null object, obtained by decoding a null pointer.
A struct
A capability
A List(void)
A list of bits
A list of octets
A list of 16 bit words
A list of 32 bit words
A list of 64 bits words
A list of pointers
A list of fixed-width composites
A value. This kind of object does not exist on the wire and is not specified by Capnp.
It is an internal helper to represent lists of primitive values as lists of structs.
Provides extension methods for
LINQ-like "Select" operator for , with the addition that the resulting elements are accessible by index.
The operator implements lazy semantics, which means that the selector function results are not cached./>
Source element type
Target element type
Source list
Selector function
A read-only list in which each element corresponds to the source element after applying the selector function
or is null.
Applies a selector function to each list element and stores the result in a new list.
As opposed to the source is evaluated immediately
and the result is cached.
Source element type
Target element type
Source list
Selector function
A read-only list in which each element corresponds to the source element after applying the selector function
or is null.
Provides deep-copy functionality to re-serialize an existing deserializer state into another serializer state.
Performs a deep copy of an existing deserializer state into another serializer state.
This implementation does not analyze the source object graph and therefore cannot detect multiple references to the same object.
Such cases will result in object duplication.
source state
target state
is null.
Target state was already set to a different object type than the source state.
Security violation due to amplification attack or stack overflow DoS attack,
or illegal pointer detected during deserialization.
Helper struct to support tail calls
Wraps a SerializerState
object to wrap
Wraps a PendingQuestion
object to wrap
SerializerState, if applicable
PendingQuestion, if applicable
Generic Proxy implementation which exposes the (usually protected) Call method.
Wraps a capability implementation in a Proxy.
Capability implementation
Proxy
is null.
No found on implemented interface(s).
Mismatch between generic type arguments (if capability interface is generic).
Mismatch between generic type arguments (if capability interface is generic).
Problem with instatiating the Skeleton (constructor threw exception).
Caller does not have permission to invoke the Skeleton constructor.
Problem with building the Skeleton type, or problem with loading some dependent class.
Constructs an unbound instance.
Constructs an instance and binds it to the given low-level capability.
low-level capability
Requests a method call.
Target interface ID
Target method ID
Method arguments
Whether it is a tail call
Answer promise
Provides functionality to construct Proxy and Skeleton instances from capability interfaces and objects implementing capability interfaces.
A capability interface is any .NET interface which is annotated with and .
There are some intricacies to consider that you usually don't need to care about, since all that stuff will be generated.
Creates a Skeleton for a given interface implementation.
Interface implementation. Must implement at least one interface which is annotated with a .
The Skeleton
is null.
No found on implemented interface(s).
Mismatch between generic type arguments (if capability interface is generic).
Mismatch between generic type arguments (if capability interface is generic).
Problem with instatiating the Skeleton (constructor threw exception).
Caller does not have permission to invoke the Skeleton constructor.
Problem with building the Skeleton type, or problem with loading some dependent class.
Validates that a given type qualifies as cpapbility interface, throws on failure.
type to check
is null.
Given typ did not qualify as capability interface.
Message and probably InnterException give more details.
Checkes whether a given type qualifies as cpapbility interface./> on failure.
type to check
true when is a capability interface
is null.
Constructs a Proxy for given capability interface and wraps it around given low-level capability.
Capability interface. Must be annotated with .
low-level capability
debugging aid
debugging aid
debugging aid
The Proxy instance which implements .
is null.
did not qualify as capability interface.
Mismatch between generic type arguments (if capability interface is generic).
Mismatch between generic type arguments (if capability interface is generic).
Problem with instatiating the Proxy (constructor threw exception).
Caller does not have permission to invoke the Proxy constructor.
Problem with building the Proxy type, or problem with loading some dependent class.
Base class for a low-level capability at consumer side. It is created by the . An application does not directly interact with it
(which is intentionally impossible, since the invocation method is internal), but instead uses a -derived wrapper.
Request the RPC engine to release this capability from its import table,
which usually also means to remove it from the remote peer's export table.
A uni-directional endpoint, used in conjunction with the .
Transmit the given Cap'n Proto message over this endpoint.
Close this endpoint.
A mono skeleton (as opposed to ) is a skeleton which implements one particular RPC interface.
Interface ID of this skeleton.
Provides support for promise pipelining.
Attaches a continuation to the given promise and registers the resulting task for pipelining.
Task result type
The promise
The continuation
Task representing the future answer
or is null.
The pomise was already registered.
Looks up the underlying promise which was previously registered for the given Task using MakePipelineAware.
The underlying promise
is null.
The task was not registered using MakePipelineAware.
Returns a local "lazy" proxy for a given Task.
This is not real promise pipelining and will probably be removed.
Capability interface type
The task
debugging aid
debugging aid
debugging aid
A proxy for the given task.
is null.
did not
quality as capability interface.
Checks whether a given task belongs to a pending RPC and requests a tail call if applicable.
Task result type
Task to request
Converts the task's result to a SerializerState
Tail-call aware task
Overload for tuple-typed tasks
Overload for tuple-typed tasks
Overload for tuple-typed tasks
Overload for tuple-typed tasks
Overload for tuple-typed tasks
Overload for tuple-typed tasks
Low-level capability which as imported from a remote peer.
Will be thrown if a type did not qualify as capability interface.
In order to qualify the type must be properly annotated with a and .
See descriptions of these attributes for further details.
Constructs an instance.
Constructs an instance with message an inner exception.
A promised answer due to RPC.
Disposing the instance before the answer is available results in a best effort attempt to cancel
the ongoing call.
Task which will complete when the RPC returns, delivering its result struct.
Creates a low-level capability for promise pipelining.
Path to the desired capability inside the result struct.
Pipelined low-level capability
Low-level interface of a capability at provider side.
Calls an interface method of this capability.
ID of interface to call
ID of method to call
Method arguments ("params struct")
Cancellation token, indicating when the call should cancelled.
A Task which will resolve to the call result ("result struct")
A promised capability.
Will eventually give the resolved capability.
A path from an outer Cap'n Proto struct to an inner (probably deeply nested) struct member.
Path to the bootstrap capability (which is an empty path)
Deserializes a MemberAccessPath from Cap'n Proto representation.
Cap'n Proto representation
The MemberAccessPath
Constructs a path from qualifiers.
List of member access elements
Constructs a path from Cap'n Proto struct member offsets.
Member offsets
Base class of an individual member access.
This might appear a bit of overengineering, since the only specialization is the .
But there might be further specializations in the future, the most obvious one being an "ArrayElementAccess".
Now we already have a suitable design pattern, mainly to show the abstract concept behind a member access path.
Deserializes a MemberAccess instance from Cap'n Proto representation.
Cap'n Proto representation
Deserialized instance
Serializes this instance to a .
Serialization target
Evaluates the member access on a given struct instance.
Input struct instance
Member value or object
The one and only member access which is currently supported: Member of a struct.
Constructs an instance for given struct member offset.
The Cap'n Proto struct member offset
The Cap'n Proto struct member offset
Serializes this instance to a .
Serialization target
Evaluates the member access on a given struct instance.
Input struct instance
Member value or object
The access path is a composition of individual member accesses.
Serializes this path th a .
The serialization target
Evaluates the path on a given object.
The object (usually "params struct") on which to evaluate this path.
Resulting low-level capability
Evaluation of this path did not give a capability
A promised answer due to RPC.
Disposing the instance before the answer is available results in a best effort attempt to cancel
the ongoing call.
Question lifetime management state
The question has not yet been sent.
Tail call flag
The question has been sent.
The question has been answered.
A 'finish' request was sent to the peer, indicating that no further requests will refer
to this question.
Question object was disposed.
Question object was finalized by GC.
This flag should only be observable when debugging the finalizer itself.
Eventually returns the server answer
Refer to a (possibly nested) member of this question's (possibly future) result and return
it as a capability.
Access path
Low-level capability
The referenced member does not exist or does not resolve to a capability pointer.
Finalizer
Implements .
Combines multiple skeletons to represent objects which implement multiple interfaces.
Adds a skeleton to this instance.
Interface ID
Skeleton to add
is null.
A skeleton with was already added.
Calls an interface method of this capability.
ID of interface to call
ID of method to call
Method arguments ("params struct")
Cancellation token, indicating when the call should cancelled.
A Task which will resolve to the call result
Dispose pattern implementation
Application-level wrapper for consumer-side capabilities.
The code generator will produce a Proxy specialization for each capability interface.
Will eventually give the resolved capability, if this is a promised capability.
Underlying low-level capability
Whether is this a broken capability.
Calls a method of this capability.
Interface ID to call
Method ID to call
Method arguments ("param struct")
Whether it is a tail call
For cancelling an ongoing method call
An answer promise
This instance was disposed, or transport-layer stream was disposed.
Capability is broken.
An I/O error occurs.
Constructs a null instance.
Dispose pattern implementation
Finalizer
Dispose pattern implementation
Casts this Proxy to a different capability interface.
Desired capability interface
Whether to Dispose() this Proxy instance
Proxy for desired capability interface
did not qualify as capability interface.
This capability is broken, or mismatch between generic type arguments (if capability interface is generic).
Mismatch between generic type arguments (if capability interface is generic).
Problem with instatiating the Proxy (constructor threw exception).
Caller does not have permission to invoke the Proxy constructor.
Problem with building the Proxy type, or problem with loading some dependent class.
Annotates a capability interface with its Proxy implementation.
Constructs this attribute.
Proxy type. This must be a class which inherits from and
exposes a public parameterless constructor. Moreover, it must have same amount of generic type
parameters like the annotated interface, with identical generic constraints.
is null.
The Proxy type.
Part of the Dispose pattern implementation.
Implements the Cap'n Proto RPC protocol.
Gets or sets the bootstrap capability.
Thrown when an RPC-related error condition occurs.
Constructs an instance.
Constructs an instance with message and inner exception.
A skeleton is a wrapper around a capability interface implementation which adapts it in the way it is
expected by the .
Claims ownership on the given capability, preventing its automatic disposal.
Capability interface
Capability implementation
A disposable object. Calling Dispose() on the returned instance relinquishes ownership again.
Calls an interface method of this capability.
ID of interface to call
ID of method to call
Method arguments ("params struct")
Cancellation token, indicating when the call should cancelled.
A Task which will resolve to the call result
Dispose pattern implementation
Finalizer
Skeleton for a specific capability interface.
Capability interface
Constructs an instance.
Populates this skeleton's method table. The method table maps method IDs (which are consecutively numbered from 0
onwards) to the underlying capability's method implementations.
The method table. Index is method ID.
Gets the underlying capability implementation.
Gets the ID of the implemented interface.
Calls an interface method of this capability.
ID of interface to call
ID of method to call
Method arguments ("params struct")
Cancellation token, indicating when the call should cancelled.
A Task which will resolve to the call result
This Skeleton was disposed
Dispose pattern implementation
Annotates a capability interface with its Skeleton implementation.
Constructs this attribute.
Skeleton type. This must be a class which inherits from and
exposes a public parameterless constructor. Moreover, it must have same amount of generic type
parameters like the annotated interface, with identical generic constraints.
is null.
Gets the skeleton type.
TCP-based RPC implementation which will establish a connection to a TCP server implementing
the Cap'n Proto RPC protocol.
Gets a Task which completes when TCP is connected.
Constructs an instance and attempts to connect it to given host.
The DNS name of the remote RPC host
The port number of the remote RPC host
is null.
is not between System.Net.IPEndPoint.MinPort and System.Net.IPEndPoint.MaxPort.
An error occurred when accessing the socket.
Returns the remote bootstrap capability.
Bootstrap capability interface
A proxy for the bootstrap capability
Dispose pattern implementation
Gets the number of RPC protocol messages sent by this client so far.
Gets the number of RPC protocol messages received by this client so far.
Gets the remote port number which this client is connected to,
or null if the connection is not yet established.
Whether the I/O thread is currently running
Whether the I/O thread is waiting for data to receive
Cap'n Proto RPC TCP server.
Models an incoming connection.
Server-side port
Receive message counter
Sent message counter
Whether the RPC engine is currently computing.
Whether the connection is idle, waiting for data to receive.
Gets the number of currently active inbound TCP connections.
Stops accepting incoming attempts and closes all existing connections.
Constructs an instance.
An System.Net.IPAddress that represents the local IP address.
The port on which to listen for incoming connection attempts.
is null.
is not between System.Net.IPEndPoint.MinPort and System.Net.IPEndPoint.MaxPort.
Whether the thread which is responsible for acception incoming attempts is still alive.
The thread will die upon disposal, but also in case of a socket error condition.
Errors which occur on a particular connection will just close that connection and won't interfere
with the acceptor thread.
Sets the bootstrap capability. It must be an object which implements a valid capability interface
().
Gets a snapshot of currently active connections.
Provides the security bounds for defeating amplification and stack overflow DoS attacks.
See https://capnproto.org/encoding.html#security-considerations for details.
The traversal limit, see https://capnproto.org/encoding.html#amplification-attack
The recursion limit, see https://capnproto.org/encoding.html#stack-overflow-dos-attack
The segment allocator default implementation.
Constructs an instance.
Default size (in words) of a newly allocated segment. If a single allocation requires
a bigger size, a bigger dedicated segment will be allocated. On the wire, segments will be truncated to their actual
occupancies.
The list of currently allocated segments, each one truncated to its actual occupancy.
Allocates memory.
Number of words to allocate
Preferred segment index. If enough space is available,
memory will be allocated inside that segment. Otherwise, a different segment will be chosen, or
a new one will be allocated, or allocation will fail (depending on ).
The allocated memory slice in case of success (default(SegmentSlice) otherwise)
Whether using the preferred segment is mandatory. If it is and there is not
enough space available, allocation will fail.
Whether allocation was successful.
Helper struct to represent the tuple (segment index, offset)
Segment index
Word offset within segment
Provides extensions to the and interfaces for type-safe reading and writing.
Reads a boolean field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a boolean field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a byte field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a byte field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a signed byte field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a signed byte field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a ushort field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a ushort field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a short field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a short field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a uint field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a uint field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Performs a "reinterpret cast" of the struct's data section and returns a reference to a single element of the cast result.
The cast target type. Must be a primitive type which qualifies for ()]]>
"this" instance
Index within the cast result, conceptually into U[]
A reference to the data element
Reads an int field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes an int field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a ulong field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a ulong field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a long field.
Type implementing
"this" instance
Start bit
Field default value (will be XORed with the result)
The read value
Writes a long field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (will be XORed with the value to write)
Reads a float field.
Type implementing
"this" instance
Start bit
Field default value (raw bits will be XORed with the result)
The read value
Writes a float field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (raw bits will be XORed with the value to write)
Reads a double field.
Type implementing
"this" instance
Start bit
Field default value (raw bits will be XORed with the result)
The read value
Writes a double field.
Type implementing
"this" instance
Start bit
Value to write
Field default value (raw bits will be XORed with the value to write)
Implements the heart of serialization. Exposes all functionality to encode serialized data.
Although it is public, you should not use it directly. Instead, use the reader, writer, and domain class adapters which are produced
by the code generator. Particularly, those writer classes are actually specializations of SerializerState, adding convenience methods
for accessing the struct's fields.
Constructs a SerializerState instance for use in RPC context.
This particularly means that the capability table will be initialized.
Type of state (must inherit from SerializerState)
root object state
Constructs an unbound serializer state.
Constructs a serializer state which is bound to a particular message builder.
message builder to bind
Represents this state by a different serializer state specialization. This is similar to a type-cast: The underlying object remains the same,
but the specialization adds a particular "view" on that data.
target serializer state type
serializer state instance
The target serializer state is incompatible to this instance, because the instances do not agree on the
kind of underlying object (e.g. struct with particular data/pointer section size, list of something)
Whether storage space for the underlying object was already allocated. Note that allocation happens
lazily, i.e. constructing a SerializerState and binding it to a MessageBuilder does NOT yet result in allocation.
Given this state describes a struct and is allocated, returns the struct's data section.
Returns the allocated memory slice (given this state already is allocated). Note that this definition is somewhat
non-symmetric to DeserializerState.RawData
. Never mind: You should not use it directly, anyway.
Allocates storage for the underlying object. Does nothing if it is already allocated. From the point the object is allocated, its type cannot by changed
anymore (e.g. changing from struct to list, or modifying the struct's section sizes).
Links a sub-item (struct field or list element) of this state to another state. Usually, this operation is not necessary, since objects are constructed top-down.
However, there might be some advanced scenarios where you want to reference the same object twice (also interesting for designing amplification attacks).
The Cap'n Proto serialization intrinsically supports this, since messages are object graphs, not trees.
If this state describes a struct: Index into this struct's pointer table.
If this state describes a list of pointers: List element index.
state to be linked
Whether to deep copy the target state if it belongs to a different message builder than this state.
is null
out of range
- This state does neither describe a struct, nor a list of pointers
- Another state is already linked to the specified position (sorry, no overwrite allowed)
- This state and belong to different message builder, and is false
Links a sub-item (struct field or list element) of this state to a capability.
If this state describes a struct: Index into this struct's pointer table.
If this state describes a list of pointers: List element index.
capability index inside the capability table
- This state does neither describe a struct, nor a list of pointers
- Another state is already linked to the specified position (sorry, no overwrite allowed)
Determines the underlying object to be a struct.
Desired size of the struct's data section, in words
Desired size of the struct's pointer section, in words
The object type was already set to something different
Determines the underlying object to be a list of (primitive) values.
Element size in bits, must be 0 (void), 1 (bool), 8, 16, 32, or 64
Desired element count
The object type was already set to something different
outside allowed range,
negative or exceeding 2^29-1
Determines the underlying object to be a list of pointers.
Desired element count
The object type was already set to something different
negative or exceeding 2^29-1
Determines the underlying object to be a list of structs (fixed-width compound list).
Desired element count
Desired size of each struct's data section, in words
Desired size of each struct's pointer section, in words
The object type was already set to something different
negative, or total word count would exceed 2^29-1
Determines the underlying object to be a list of bytes and encodes the given text.
text to encode
is null
Trying to obtain the UTF-8 encoding might throw this exception.
The object type was already set to something different
UTF-8 encoding exceeds 2^29-2 bytes
Writes data (up to 64 bits) into the underlying struct's data section.
The write operation must be aligned to fit within a single word.
Start bit relative to the struct's data section, little endian
Number of bits to write
Data bits to write
The object was not determined to be a struct
The data slice specified by and
is not completely within the struct's data section, misaligned, exceeds one word, or is negative
Reads data (up to 64 bits) from the underlying struct's data section.
The write operation must be aligned to fit within a single word.
Start bit relative to the struct's data section, little endian
Number of bits to read
Data bits which were read
The object was not determined to be a struct
The data slice specified by and
is not completely within the struct's data section, misaligned, exceeds one word, or is negative
Constructs a new object at a struct field or list element, or returns the serializer state for an existing object.
Target state type
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
Bound serializer state instance
- The underlying object was not determined to be a struct or list of pointers.
- Object at given position was already built and is not compatible with the desired target serializer type.
is out of bounds.
Returns an existing serializer state for a struct field or list element, or null if no such object exists.
Target state type
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
Bound serializer state instance
- The underlying object was not determined to be a struct or list of pointers.
- Object at given position is not compatible with the desired target serializer type.
is out of bounds.
Convenience method for ]]>
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
Bound serializer state instance
- The underlying object was not determined to be a struct or list of pointers.
- Object at given position was already built and is not compatible with the desired target serializer type.
is out of bounds.
Convenience method for ]]>
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
Bound serializer state instance
- The underlying object was not determined to be a struct or list of pointers.
- Object at given position is not compatible with the desired target serializer type.
is out of bounds.
Reads text from a struct field or list element.
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
String to return in case of null
The decoded text
Encodes text into a struct field or list element.
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
Text to encode
is null
- The underlying object was not determined to be a struct or list of pointers.
- Object at given position was already set.
is out of bounds.
Encodes text into a struct field or list element, with fallback to a default text.
If the underlying object is a struct: index into the struct's pointer section.
If the underlying object is a list of pointers: Element index
Text to encode
Default text of > is null
Both and are null
- The underlying object was not determined to be a struct or list of pointers.
- Object at given position was already set.
is out of bounds.
Returns a state which represents a fixed-width composite list element.
Element index
Bound serializer state
Underlying object was not determined to be a fixed-width composite list.
is out of bounds.
Returns a state which represents a fixed-width composite list element.
Target serializer state type
Bound serializer state
Underlying object was not determined to be a fixed-width composite list.
is out of bounds.
Sets an element of a list of bits.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of bits.
is out of bounds.
Sets the list-of-bits' content.
Content to set
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of bits.
is null.
The given element count does not match the underlying list's element count.
Sets an element of a list of bytes.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of bytes.
is out of bounds.
Returns the content of a list of bytes.
The list bytes
The underlying object was not set to a list of bytes.
Decodes a list of bytes as text.
The decoded text.
The underlying object was not set to a list of bytes.
Might theoretically be thrown during decoding.
Sets an element of a list of (signed) bytes.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of bytes.
is out of bounds.
Sets an element of a list of 16 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 16 bit words.
is out of bounds.
Sets an element of a list of 16 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 16 bit words.
is out of bounds.
Sets an element of a list of 32 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 32 bit words.
is out of bounds.
Sets an element of a list of 32 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 32 bit words.
is out of bounds.
Sets an element of a list of 32 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 32 bit words.
is out of bounds.
Sets an element of a list of 64 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 64 bit words.
is out of bounds.
Sets an element of a list of 64 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 64 bit words.
is out of bounds.
Sets an element of a list of 64 bit words.
Element index
Element value
Element default value (serialized value will be XORed with the default value)
The underlying object was not set to a list of 64 bit words.
is out of bounds.
Adds an entry to the capability table if the provided capability does not yet exist.
The low-level capability object to provide.
Index of the given capability in the capability table
The underlying message builder was not configured for capability table support.
Adds an entry to the capability table if the provided capability does not yet exist.
The capability to provide, in terms of its skeleton.
Index of the given capability in the capability table
The underlying message builder was not configured for capability table support.
Adds an entry to the capability table if the provided capability does not yet exist.
The capability, in one of the following forms:
- Low-level capability object (
Rpc.ConsumedCapability
)
- Proxy object (
Rpc.Proxy
)
- Skeleton object (
Rpc.Skeleton
)
- Capability interface implementation
Index of the given capability in the capability table
The underlying message builder was not configured for capability table support.
Links a sub-item (struct field or list element) of this state to another object.
In contrast to , this method also accepts deserializer states, domain objects, capabilites, and lists thereof.
If necessary, it will perform a deep copy.
If this state describes a struct: Index into this struct's pointer table.
If this state describes a list of pointers: List element index.
Object to be linked. Must be one of the following:
- Another
- A (will always deep copy)
- An object implementing
- A low-level capability object ()
- A proxy object ()
- A skeleton object ()
- A capability interface implementation
- A of one of the things listed here.
is out of range.
- This state does neither describe a struct, nor a list of pointers
- Another state is already linked to the specified position (sorry, no overwrite allowed)
Reads a struct field as capability and returns a proxy to that capability.
Desired capability interface
Index into this struct's pointer table.
The proxy instance
is out of range.
The desired interface does not qualify as capability interface ()
This state does not represent a struct.
Reads a struct field as capability and returns a bare (generic) proxy to that capability.
Index into this struct's pointer table.
The proxy instance
is out of range.
This state does not represent a struct.
This method exists until NET Standard 2.1 is released
This method exists until NET Standard 2.1 is released
This method exists until NET Standard 2.1 is released
Represents a Cap'n Proto message. Actually a lightweight wrapper struct around a read-only list of memory segments.
The message segments
Constructs a message from a list of segments.
Pointer tag, see https://capnproto.org/encoding.html/>
Struct pointer
List pointer
Far pointer
Other (capability) pointer
Lightweight wrapper struct around a Cap'n Proto pointer. Useful for both encoding and decoding pointers.
Constructs this struct from pointer raw data
Interprets any ulong value as Cap'n Proto pointer
Extracts the wire data from the pointer.
Pointer tag "A"
Returns true iff this is a null pointer.
The Offset (field "B") for struct and list pointers.
Thrown by setter if encoded value would require more than 30 bits
Returns the landing pad offset (field "C") for inter-segment pointers.
Returns the size of the struct's data section (field "C"), in words, for struct pointers.
Returns the size of the struct's pointer section (field "D"), in words, for struct pointers.
Convenience getter which returns the sum of the struct's pointer and data section sizes.
Begins encoding a struct pointer.
the size of the struct's data section, in words
the size of the struct's pointer section, in words
Returns the list "size" (field "C") for list pointers.
Gets or sets the element count if this pointer represents a list of fixed-width composite values.
negative value, or encoded value would require more than 30 bits
Returns the element count if this pointer represents a list of anything, except fixed-width composite values.
Begins encoding a list pointer
element "size" (field "C")
element count
element count would require more than 29 bits
Returns the target segment index (field "D") for inter-segment pointers.
Whether the landing pad is two words (field "B") for inter-segment pointers.
Encodes an inter-segment pointer.
target segment index
landing pad offset
whether the landing pad is two words
negative landing pad offset, or encoding would require more than 29 bits
Returns the sub-kind of pointer (field "B") if this is an "other" pointer.
Currently, only 0 is specified, which is a capability pointer.
Returns the capability index (field "C") if this is a capability pointer.
Encodes a capability pointer.
capability index