Skip to main content

PrimitiveElement

Trait PrimitiveElement 

Source
pub trait PrimitiveElement {
    // Required methods
    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§

Source

fn get(list_reader: &ListReader<'_>, index: ElementCount32) -> Self

Gets the element at position index. Panics if the index is out of bounds.

Source

fn get_from_builder( list_builder: &ListBuilder<'_>, index: ElementCount32, ) -> Self

Gets the element at position index. Panics if the index is out of bounds.

Source

fn set(list_builder: &ListBuilder<'_>, index: ElementCount32, value: Self)

Sets to element at position index to be value. Panics if the index is out of bounds.

Source

fn element_size() -> ElementSize

Returns the size of an individual element.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PrimitiveElement for ()

Source§

impl PrimitiveElement for bool

Source§

fn get(list: &ListReader<'_>, index: ElementCount32) -> Self

Source§

fn get_from_builder(list: &ListBuilder<'_>, index: ElementCount32) -> Self

Source§

fn set(list: &ListBuilder<'_>, index: ElementCount32, value: Self)

Source§

fn element_size() -> ElementSize

Implementors§

Source§

impl<T: Primitive> PrimitiveElement for T