Trait polars_arrow::array::iterator::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§