[][src]Trait flatk::ViewIterator

pub trait ViewIterator<'a> {
    type Item;
    type Iter: Iterator<Item = Self::Item>;
    fn view_iter(&'a self) -> Self::Iter;
}

A convenience trait to allow generic implementations to call an iterator over the view. This is necessary because the View trait has an explicit lifetime parameter, which makes it difficult or impossible to use in generic functions. For instance it becomes difficult/impossible to impose constraints like Set on View::Type.

Associated Types

type Item

type Iter: Iterator<Item = Self::Item>

Loading content...

Required methods

fn view_iter(&'a self) -> Self::Iter

Loading content...

Implementations on Foreign Types

impl<'a, T: 'a> ViewIterator<'a> for [T][src]

type Item = &'a T

type Iter = Iter<'a, T>

impl<'a, T: 'a> ViewIterator<'a> for Vec<T>[src]

type Item = &'a T

type Iter = Iter<'a, T>

Loading content...

Implementors

impl<'a, S> ViewIterator<'a> for ChunkedN<S> where
    S: View<'a>,
    <S as View<'a>>::Type: SplitAt + Set + Dummy
[src]

type Item = S::Type

type Iter = Chunks<S::Type>

impl<'a, S, I> ViewIterator<'a> for Subset<S, I> where
    S: Set + View<'a>,
    I: AsRef<[usize]>,
    <S as View<'a>>::Type: SplitAt + SplitFirst + Set + Dummy
[src]

type Item = <<S as View<'a>>::Type as SplitFirst>::First

type Iter = SubsetIter<S::Type, &'a [usize]>

impl<'a, S, N> ViewIterator<'a> for UniChunked<S, U<N>> where
    S: View<'a>,
    <S as View<'a>>::Type: IntoStaticChunkIterator<N>,
    N: Unsigned
[src]

type Item = <S::Type as IntoStaticChunkIterator<N>>::Item

type Iter = <S::Type as IntoStaticChunkIterator<N>>::IterType

impl<'a, S, O> ViewIterator<'a> for Chunked<S, O> where
    S: View<'a>,
    O: View<'a, Type = Offsets<&'a [usize]>>,
    <S as View<'a>>::Type: SplitAt + Set + Dummy
[src]

type Item = <S as View<'a>>::Type

type Iter = VarIter<'a, <S as View<'a>>::Type>

impl<'a, S, T, I> ViewIterator<'a> for Sparse<S, T, I> where
    S: View<'a>,
    <S as View<'a>>::Type: Set + IntoIterator
[src]

type Item = <<S as View<'a>>::Type as IntoIterator>::Item

type Iter = <<S as View<'a>>::Type as IntoIterator>::IntoIter

Loading content...