Trait vortex_array::accessor::ArrayAccessor

source ·
pub trait ArrayAccessor<Item: ?Sized> {
    // Required method
    fn with_iterator<F, R>(&self, f: F) -> VortexResult<R>
       where F: for<'a> FnOnce(&mut dyn Iterator<Item = Option<&'a Item>>) -> R;
}
Expand description

Trait for arrays that support iterative access to their elements.

Required Methods§

source

fn with_iterator<F, R>(&self, f: F) -> VortexResult<R>
where F: for<'a> FnOnce(&mut dyn Iterator<Item = Option<&'a Item>>) -> R,

Iterate over each element of the array, in-order.

The function f will be passed an Iterator, it can call next on the iterator len times. Iterator elements are Option types, regardless of the nullability of the underlying array data.

Object Safety§

This trait is not object safe.

Implementors§