Struct capnp::struct_list::Builder
source · pub struct Builder<'a, T>where
T: for<'b> OwnedStruct<'b>,{ /* private fields */ }
Implementations§
source§impl<'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.
source§impl<'a, T> Builder<'a, T>where
T: for<'b> OwnedStruct<'b>,
impl<'a, T> Builder<'a, T>where
T: for<'b> OwnedStruct<'b>,
source§impl<'a, T> Builder<'a, T>where
T: for<'b> OwnedStruct<'b>,
impl<'a, T> Builder<'a, T>where
T: for<'b> OwnedStruct<'b>,
sourcepub fn get(self, index: u32) -> <T as OwnedStruct<'a>>::Builder
pub fn get(self, index: u32) -> <T as OwnedStruct<'a>>::Builder
Gets the element at position index
. Panics if index
is greater than or
equal to len()
.