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]

§

type Item = T

source§

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

source§

fn len(&self) -> usize

Implementors§

source§

impl<'a> ArrayAccessor<'a> for BooleanArray

§

type Item = bool

source§

impl<'a> ArrayAccessor<'a> for FixedSizeListArray

§

type Item = Box<dyn Array>

source§

impl<'a, O: Offset> ArrayAccessor<'a> for BinaryArray<O>

§

type Item = &'a [u8]

source§

impl<'a, O: Offset> ArrayAccessor<'a> for ListArray<O>

§

type Item = Box<dyn Array>

source§

impl<'a, O: Offset> ArrayAccessor<'a> for MutableBinaryValuesArray<O>

§

type Item = &'a [u8]

source§

impl<'a, O: Offset> ArrayAccessor<'a> for MutableUtf8Array<O>

§

type Item = &'a str

source§

impl<'a, O: Offset> ArrayAccessor<'a> for MutableUtf8ValuesArray<O>

§

type Item = &'a str

source§

impl<'a, O: Offset> ArrayAccessor<'a> for Utf8Array<O>

§

type Item = &'a str

source§

impl<'a, T: 'a> ArrayAccessor<'a> for Buffer<T>

§

type Item = &'a T

source§

impl<'a, T: ViewType + ?Sized> ArrayAccessor<'a> for BinaryViewArrayGeneric<T>

§

type Item = &'a T

source§

impl<'a, T: ViewType + ?Sized> ArrayAccessor<'a> for MutableBinaryViewArray<T>

§

type Item = &'a T