Struct capnp::message::Builder

source ·
pub struct Builder<A>where
    A: Allocator,
{ /* private fields */ }
Expand description

A container used to build a message.

Implementations§

Initializes the root as a value of the given type.

Gets the root, interpreting it as the given type.

Sets the root to a deep copy of the given value.

Sets the root to a canonicalized version of value. If this was the first action taken on this Builder, then a subsequent call to get_segments_for_output() should return a single segment, containing the full canonicalized message.

Retrieves the underlying Allocator, deallocating all currently-allocated segments.

Constructs a new message::Builder<HeapAllocator> whose first segment has length SUGGESTED_FIRST_SEGMENT_WORDS.

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
Gets the segment with index idx. Returns None if idx is out of range. Read more
Gets the number of segments.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.