Trait capnp::private::layout::PrimitiveElement
source · pub trait PrimitiveElement {
fn get(list_reader: &ListReader<'_>, index: ElementCount32) -> Self;
fn get_from_builder(
list_builder: &ListBuilder<'_>,
index: ElementCount32
) -> Self;
fn set(list_builder: &ListBuilder<'_>, index: ElementCount32, value: Self);
fn element_size() -> ElementSize;
}
Expand description
An element that can be stored in a primitive_list
.
Required Methods§
sourcefn get(list_reader: &ListReader<'_>, index: ElementCount32) -> Self
fn get(list_reader: &ListReader<'_>, index: ElementCount32) -> Self
Gets the element at position index
. Bounds checking is not performed.
sourcefn get_from_builder(
list_builder: &ListBuilder<'_>,
index: ElementCount32
) -> Self
fn get_from_builder(
list_builder: &ListBuilder<'_>,
index: ElementCount32
) -> Self
Gets the element at position index
. Bounds checking is not performed.
sourcefn set(list_builder: &ListBuilder<'_>, index: ElementCount32, value: Self)
fn set(list_builder: &ListBuilder<'_>, index: ElementCount32, value: Self)
Sets to element at position index
to be value
. Bounds checking is not performed.
sourcefn element_size() -> ElementSize
fn element_size() -> ElementSize
Returns the size of an individual element.