Trait array_iter_tools::ArrayIterator [−][src]
pub trait ArrayIterator<const N: usize>: Sized { type Item; fn get(&self, n: usize) -> Self::Item; fn map_array<U, F: Fn(Self::Item) -> U>(self, f: F) -> Map<Self, F> { ... } fn zip_array<B: ArrayIterator<N>>(self, b: B) -> Zip<Self, B> { ... } fn collect_array(self) -> [Self::Item; N]
where
Self::Item: Copy, { ... } fn build_array(self) -> [Self::Item; N]
where
Self::Item: Drop, { ... } }
Expand description
Similar to Iterator, ArrayIterator is an iterator over constant
sized arrays
Associated Types
Required methods
Provided methods
Lazily mutate the contents of an array
fn zip_array<B: ArrayIterator<N>>(self, b: B) -> Zip<Self, B>[src]
fn zip_array<B: ArrayIterator<N>>(self, b: B) -> Zip<Self, B>[src]Lazily combine two ArrayIterators into an new one
Collect the contents of this ArrayIterator into an array
This is very similar to build_array but ignores
the case that any drop handlers need to be called
Build the contents of this ArrayIterator into an array
This is very similar to collect_array but explicitly handles the
case where the function panics and items need to be dropped
Implementations on Foreign Types
Implementors
impl<A, B, const N: usize> ArrayIterator<N> for Zip<A, B> where
A: ArrayIterator<N>,
B: ArrayIterator<N>, [src]
impl<A, B, const N: usize> ArrayIterator<N> for Zip<A, B> where
A: ArrayIterator<N>,
B: ArrayIterator<N>, [src]