Trait risinglight::array::Array

source ·
pub trait Array: Sized + Send + Sync + 'static {
    type Builder: ArrayBuilder<Array = Self>;
    type Item: ToOwned + ?Sized;

    fn is_null(&self, idx: usize) -> bool;
    fn get_raw(&self, idx: usize) -> &Self::Item;
    fn len(&self) -> usize;
    fn filter(&self, p: &[bool]) -> Self;

    fn get(&self, idx: usize) -> Option<&Self::Item> { ... }
    fn iter(&self) -> impl DoubleEndedIterator<Item = Option<&Self::Item>> { ... }
    fn raw_iter(&self) -> impl DoubleEndedIterator<Item = &Self::Item> { ... }
    fn nonnull_iter(&self) -> impl DoubleEndedIterator<Item = &Self::Item> { ... }
    fn is_empty(&self) -> bool { ... }
}
Expand description

A trait over all array.

Array must be built with an ArrayBuilder. The array trait provides several unified interface on an array, like len, get and iter.

The Builder associated type is the builder for this array. The Item is the item you could retrieve from this array.

For example, PrimitiveArray could return an Option<&u32>, and Utf8Array will return an Option<&str>.

Required Associated Types§

Corresponding builder of this array.

Type of element in the array.

Required Methods§

Returns true if the value at idx is null.

Returns the raw value at idx regardless of null.

Number of items of array.

Provided Methods§

Retrieve a reference to value.

Get iterator of current array.

Get iterator over the raw values.

Get iterator over the non-null values.

Check if Array is empty.

Implementors§