Trait ArrayChildren

Source
pub trait ArrayChildren {
    // Required methods
    fn get(
        &self,
        index: usize,
        dtype: &DType,
        len: usize,
    ) -> VortexResult<ArrayRef>;
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

To minimize the serialized form, arrays do not persist their own dtype and length. Instead, parent arrays pass this information down during deserialization. This trait abstracts over either a serialized crate::serde::ArrayParts or the in-memory crate::data::ArrayData.

Required Methods§

Source

fn get(&self, index: usize, dtype: &DType, len: usize) -> VortexResult<ArrayRef>

Returns the nth child of the array with the given dtype and length.

Source

fn len(&self) -> usize

The number of children.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if there are no children.

Implementors§