polars_arrow::array::iterator

Trait ArrayAccessor

Source
pub unsafe trait ArrayAccessor<'a>: Sealed {
    type Item: 'a;

    // Required methods
    unsafe fn value_unchecked(&'a self, index: usize) -> Self::Item;
    fn len(&self) -> usize;
}
Expand description

Sealed trait representing access to a value of an array.

§Safety

Implementers of this trait guarantee that value_unchecked is safe when called up to len

Required Associated Types§

Source

type Item: 'a

Required Methods§

Source

unsafe fn value_unchecked(&'a self, index: usize) -> Self::Item

§Safety

The index must be in-bounds in the array.

Source

fn len(&self) -> usize

Implementations on Foreign Types§

Source§

impl<'a, T: NativeType> ArrayAccessor<'a> for [T]

Source§

type Item = T

Source§

unsafe fn value_unchecked(&'a self, index: usize) -> Self::Item

Source§

fn len(&self) -> usize

Implementors§