Skip to main content

ListLikeArray

Trait ListLikeArray 

Source
pub trait ListLikeArray: Array {
    // Required methods
    fn values(&self) -> &ArrayRef;
    fn element_range(&self, index: usize) -> Range<usize>;
}
Expand description

A trait for Arrow list-like arrays, abstracting over GenericListArray, GenericListViewArray, and FixedSizeListArray.

This trait provides a uniform interface for accessing the child values and computing the element range for a given index, regardless of the underlying list layout (offsets, offsets+sizes, or fixed-size).

Required Methods§

Source

fn values(&self) -> &ArrayRef

Returns the child values array.

Source

fn element_range(&self, index: usize) -> Range<usize>

Returns the start and end indices into the values array for the list element at index.

Implementors§