[−][src]Struct capnp::message::Builder
A container used to build a message.
Methods
impl<A> Builder<A> where
A: Allocator,
[src]
A: Allocator,
pub fn new(allocator: A) -> Self
[src]
pub fn init_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> T
[src]
Initializes the root as a value of the given type.
pub fn get_root<'a, T: FromPointerBuilder<'a>>(&'a mut self) -> Result<T>
[src]
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 set_root<To, From: SetPointerBuilder<To>>(
&mut self,
value: From
) -> Result<()>
[src]
&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]
&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 subsequent 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 into_reader(self) -> Reader<Builder<A>>
[src]
impl Builder<HeapAllocator>
[src]
pub fn new_default() -> Builder<HeapAllocator>
[src]
Trait Implementations
impl<A> ReaderSegments for Builder<A> where
A: Allocator,
[src]
A: Allocator,
impl<A> Send for Builder<A> where
A: Send + Allocator,
[src]
A: Send + Allocator,
impl<A, T> From<Builder<A>> for TypedReader<Builder<A>, T> where
A: Allocator,
T: for<'a> Owned<'a>,
[src]
A: Allocator,
T: for<'a> Owned<'a>,
fn from(message: Builder<A>) -> TypedReader<Builder<A>, T>
[src]
Auto Trait Implementations
impl<A> !Sync for Builder<A>
impl<A> Unpin for Builder<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for Builder<A> where
A: UnwindSafe,
A: UnwindSafe,
impl<A> !RefUnwindSafe for Builder<A>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,