Skip to main content

ListLikeArray

Trait ListLikeArray 

Source
pub trait ListLikeArray: Array {
    // Required methods
    fn values(&self) -> &Arc<dyn Array> ;
    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) -> &Arc<dyn Array>

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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl ListLikeArray for FixedSizeListArray

Source§

impl<OffsetSize> ListLikeArray for GenericListArray<OffsetSize>
where OffsetSize: OffsetSizeTrait,

Source§

impl<OffsetSize> ListLikeArray for GenericListViewArray<OffsetSize>
where OffsetSize: OffsetSizeTrait,