Struct capnp::message::TypedBuilder
source · [−]pub struct TypedBuilder<T, A = HeapAllocator> where
T: for<'a> Owned<'a>,
A: Allocator, { /* 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
sourceimpl<T> TypedBuilder<T, HeapAllocator> where
T: for<'a> Owned<'a>,
impl<T> TypedBuilder<T, HeapAllocator> where
T: for<'a> Owned<'a>,
pub fn new_default() -> Self
sourceimpl<T, A> TypedBuilder<T, A> where
T: for<'a> Owned<'a>,
A: Allocator,
impl<T, A> TypedBuilder<T, A> where
T: for<'a> Owned<'a>,
A: Allocator,
pub fn new(message: Builder<A>) -> Self
pub fn init_root<'a>(&'a mut self) -> <T as Owned<'a>>::Builder
pub fn get_root<'a>(&'a mut self) -> Result<<T as Owned<'a>>::Builder>
pub fn get_root_as_reader<'a>(&'a self) -> Result<<T as Owned<'a>>::Reader>
pub fn set_root<'a>(&mut self, value: <T as Owned<'a>>::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
sourceimpl<A, T> From<TypedBuilder<T, A>> for TypedReader<Builder<A>, T> where
A: Allocator,
T: for<'a> Owned<'a>,
impl<A, T> From<TypedBuilder<T, A>> for TypedReader<Builder<A>, T> where
A: Allocator,
T: for<'a> Owned<'a>,
sourcefn from(builder: TypedBuilder<T, A>) -> TypedReader<Builder<A>, T>
fn from(builder: TypedBuilder<T, A>) -> TypedReader<Builder<A>, T>
Converts to this type from the input type.
Auto Trait Implementations
impl<T, A = HeapAllocator> !RefUnwindSafe for TypedBuilder<T, A>
impl<T, A> Send for TypedBuilder<T, A> where
A: Send,
T: Send,
impl<T, A = HeapAllocator> !Sync for TypedBuilder<T, A>
impl<T, A> Unpin for TypedBuilder<T, A> where
A: Unpin,
T: Unpin,
impl<T, A> UnwindSafe for TypedBuilder<T, A> where
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more