Struct capnp::message::Builder [] [src]

pub struct Builder<A> where A: Allocator {
    // some fields omitted
}

A container used to build a message.

The underlying implemention uses the Allocator as a trait object. However, we need to include A as concrete type parameter so that the typechecker can correctly deduce appropriate bounds like Send.

Methods

impl<A> Builder<A> where A: Allocator
[src]

fn new(allocator: A) -> Builder<A>

fn init_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> T

Initializes the root as a value of the given type.

fn get_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> Result<T>

Gets the root, interpreting it as the given type.

fn get_root_as_reader<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>

fn set_root<To, From: SetPointerBuilder<To>>(&mut self, value: From) -> Result<()>

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

fn get_segments_for_output<'a>(&'a self) -> OutputSegments<'a>

impl Builder<HeapAllocator>
[src]

Trait Implementations

impl<A> Send for Builder<A> where A: Send + Allocator
[src]

impl<A> Drop for Builder<A> where A: Allocator
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more