Struct capnp::message::Builder [−][src]
pub struct Builder<A> where
A: Allocator, { /* fields omitted */ }
A container used to build a message.
Methods
impl<A> Builder<A> where
A: Allocator,
[src]
impl<A> Builder<A> where
A: Allocator,
pub fn new(allocator: A) -> Self
[src]
pub fn new(allocator: A) -> Self
pub fn init_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> T
[src]
pub fn init_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> T
Initializes the root as a value of the given type.
pub fn get_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> Result<T>
[src]
pub fn get_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> Result<T>
Gets the root, interpreting it as the given type.
pub fn get_root_as_reader<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>
[src]
pub fn get_root_as_reader<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>
pub fn set_root<To, From: SetPointerBuilder<To>>(
&mut self,
value: From
) -> Result<()>
[src]
pub fn set_root<To, From: SetPointerBuilder<To>>(
&mut self,
value: From
) -> Result<()>
Sets the root to a deep copy of the given value.
pub fn set_root_canonical<To, From: SetPointerBuilder<To>>(
&mut self,
value: From
) -> Result<()>
[src]
pub fn set_root_canonical<To, From: SetPointerBuilder<To>>(
&mut self,
value: From
) -> Result<()>
Sets the root to a canonicalized version of value
. If this was the first action taken
on this Builder
, then a subsequence call to get_segments_for_output()
should return
a single segment, containing the full canonicalized message.
pub fn get_segments_for_output<'a>(&'a self) -> OutputSegments<'a>
[src]
pub fn get_segments_for_output<'a>(&'a self) -> OutputSegments<'a>
pub fn into_reader(self) -> Reader<Builder<A>>
[src]
pub fn into_reader(self) -> Reader<Builder<A>>
impl Builder<HeapAllocator>
[src]
impl Builder<HeapAllocator>
pub fn new_default() -> Builder<HeapAllocator>
[src]
pub fn new_default() -> Builder<HeapAllocator>
Trait Implementations
impl<A, T> From<Builder<A>> for TypedReader<Builder<A>, T> where
A: Allocator,
T: for<'a> Owned<'a>,
[src]
impl<A, T> From<Builder<A>> for TypedReader<Builder<A>, T> where
A: Allocator,
T: for<'a> Owned<'a>,
fn from(message: Builder<A>) -> TypedReader<Builder<A>, T>
[src]
fn from(message: Builder<A>) -> TypedReader<Builder<A>, T>
Performs the conversion.
impl<A> Send for Builder<A> where
A: Send + Allocator,
[src]
impl<A> Send for Builder<A> where
A: Send + Allocator,
impl<A> ReaderSegments for Builder<A> where
A: Allocator,
[src]
impl<A> ReaderSegments for Builder<A> where
A: Allocator,