Struct capnp::struct_list::Builder
source · pub struct Builder<'a, T>where
T: OwnedStruct,{ /* private fields */ }
Implementations§
source§impl<'a, T> Builder<'a, T>where
T: OwnedStruct,
impl<'a, T> Builder<'a, T>where
T: OwnedStruct,
pub fn len(&self) -> u32
pub fn is_empty(&self) -> bool
pub fn into_reader(self) -> Reader<'a, T>
sourcepub fn set_with_caveats<'b>(&self, index: u32, value: T::Reader<'b>) -> Result<()>where
T::Reader<'b>: IntoInternalStructReader<'b>,
pub fn set_with_caveats<'b>(&self, index: u32, value: T::Reader<'b>) -> Result<()>where
T::Reader<'b>: 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.