Struct capnp::struct_list::Builder
source · [−]pub struct Builder<'a, T> where
T: for<'b> OwnedStruct<'b>, { /* private fields */ }
Implementations
sourceimpl<'a, T> Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
impl<'a, T> Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
pub fn len(&self) -> u32
pub fn into_reader(self) -> Reader<'a, T>
sourcepub fn set_with_caveats<'b>(
&self,
index: u32,
value: <T as OwnedStruct<'b>>::Reader
) -> Result<()> where
<T as OwnedStruct<'b>>::Reader: IntoInternalStructReader<'b>,
pub fn set_with_caveats<'b>(
&self,
index: u32,
value: <T as OwnedStruct<'b>>::Reader
) -> Result<()> where
<T as OwnedStruct<'b>>::Reader: IntoInternalStructReader<'b>,
Sets the list element, with the following limitation based on the fact that structs in a struct list are allocated inline: if the source struct is larger than the target struct (as can happen if it was created with a newer version of the schema), then it will be truncated, losing fields.
sourceimpl<'a, T> Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
impl<'a, T> Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
sourceimpl<'a, T> Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
impl<'a, T> Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
pub fn get(self, index: u32) -> <T as OwnedStruct<'a>>::Builder
Trait Implementations
sourceimpl<'a, T> FromPointerBuilder<'a> for Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
impl<'a, T> FromPointerBuilder<'a> for Builder<'a, T> where
T: for<'b> OwnedStruct<'b>,
fn init_pointer(builder: PointerBuilder<'a>, size: u32) -> Builder<'a, T>
fn get_from_pointer(
builder: PointerBuilder<'a>,
default: Option<&'a [Word]>
) -> Result<Builder<'a, T>>
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Builder<'a, T>
impl<'a, T> !Send for Builder<'a, T>
impl<'a, T> !Sync for Builder<'a, T>
impl<'a, T> Unpin for Builder<'a, T> where
T: Unpin,
impl<'a, T> !UnwindSafe for Builder<'a, T>
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