Skip to main content

ArrayAccessor

Trait ArrayAccessor 

Source
pub trait ArrayAccessor {
    type Item;

    // Required methods
    fn accessor_len(&self) -> usize;
    fn accessor_get(&self, index: usize) -> Option<Self::Item>;
}
Expand description

Random access to an array’s logical values, null-aware.

Implemented on &'a ConcreteArray rather than on ConcreteArray so that borrowing value types (&str, &[u8], crate::ArrayRef) can be returned without a copy.

Required Associated Types§

Source

type Item

The logical value type, e.g. i32, &'a str or &'a [u8].

Required Methods§

Source

fn accessor_len(&self) -> usize

Number of logical slots.

Source

fn accessor_get(&self, index: usize) -> Option<Self::Item>

The value at index, or None when the slot is null or out of range.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§