Struct capnp::message::TypedBuilder
source · pub struct TypedBuilder<T, A = HeapAllocator>{ /* private fields */ }
Expand description
Stongly typed variant of the Builder
Generic type parameters:
T
- type of the capnp message which this builder is specialized on. Please see module documentation for more info about builder type specialization.A
- type of allocator
Implementations§
source§impl<T> TypedBuilder<T, HeapAllocator>where
T: Owned,
impl<T> TypedBuilder<T, HeapAllocator>where
T: Owned,
pub fn new_default() -> Self
source§impl<T, A> TypedBuilder<T, A>
impl<T, A> TypedBuilder<T, A>
pub fn new(message: Builder<A>) -> Self
pub fn init_root(&mut self) -> T::Builder<'_>
pub fn initn_root(&mut self, length: u32) -> T::Builder<'_>
pub fn get_root(&mut self) -> Result<T::Builder<'_>>
pub fn get_root_as_reader(&self) -> Result<T::Reader<'_>>
pub fn set_root(&mut self, value: T::Reader<'_>) -> Result<()>
pub fn into_inner(self) -> Builder<A>
pub fn borrow_inner(&self) -> &Builder<A>
pub fn borrow_inner_mut(&mut self) -> &mut Builder<A>
pub fn into_reader(self) -> TypedReader<Builder<A>, T>
Trait Implementations§
source§impl<T> Default for TypedBuilder<T, HeapAllocator>where
T: Owned,
impl<T> Default for TypedBuilder<T, HeapAllocator>where
T: Owned,
source§impl<T, A> From<Builder<A>> for TypedBuilder<T, A>
impl<T, A> From<Builder<A>> for TypedBuilder<T, A>
source§impl<A, T> From<TypedBuilder<T, A>> for TypedReader<Builder<A>, T>
impl<A, T> From<TypedBuilder<T, A>> for TypedReader<Builder<A>, T>
source§fn from(builder: TypedBuilder<T, A>) -> Self
fn from(builder: TypedBuilder<T, A>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T, A> RefUnwindSafe for TypedBuilder<T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A> Send for TypedBuilder<T, A>
impl<T, A = HeapAllocator> !Sync for TypedBuilder<T, A>
impl<T, A> Unpin for TypedBuilder<T, A>
impl<T, A> UnwindSafe for TypedBuilder<T, A>where
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more