[][src]Trait building_blocks_storage::access::ReadExtent

pub trait ReadExtent<'a, N> {
    type Src: 'a;
    type SrcIter: Iterator<Item = (ExtentN<N>, Self::Src)>;
    fn read_extent(&'a self, extent: &ExtentN<N>) -> Self::SrcIter;
}

A trait to facilitate the generic implementation of copy_extent.

Some lattice maps, like ChunkMap, have nonlinear layouts. This means that, in order for a writer to receive data efficiently, it must come as an iterator over multiple extents.

Associated Types

type Src: 'a

type SrcIter: Iterator<Item = (ExtentN<N>, Self::Src)>

Loading content...

Required methods

fn read_extent(&'a self, extent: &ExtentN<N>) -> Self::SrcIter

SrcIter must return extents that are subsets of extent.

Loading content...

Implementors

impl<'a, F, N, T> ReadExtent<'a, N> for F where
    F: 'a + Fn(&PointN<N>) -> T,
    ExtentN<N>: Copy,
    PointN<N>: Point
[src]

type Src = &'a Self

type SrcIter = Once<(ExtentN<N>, Self::Src)>

impl<'a, F, S, N, T> ReadExtent<'a, N> for TransformMap<'a, ArrayN<N, S>, F> where
    Self: Array<N> + Copy,
    F: 'a + Fn(S) -> T,
    PointN<N>: IntegerPoint
[src]

type Src = ArrayCopySrc<Self>

type SrcIter = Once<(ExtentN<N>, Self::Src)>

impl<'a, F, S, N, T, M> ReadExtent<'a, N> for TransformMap<'a, ChunkMapReader<'a, N, S, M>, F> where
    ChunkMapReader<'a, N, S, M>: ReadExtent<'a, N, Src = ArrayChunkCopySrc<'a, N, S>, SrcIter = ArrayChunkCopySrcIter<'a, N, S>>,
    F: 'a + Copy + Fn(S) -> T,
    S: Copy,
    T: 'a,
    M: Clone,
    PointN<N>: Point + Eq + Hash,
    ExtentN<N>: IntegerExtent<N>, 
[src]

type Src = TransformChunkCopySrc<'a, F, S, N, T>

type SrcIter = TransformChunkCopySrcIter<'a, F, S, N, T>

impl<'a, N, T, M> ReadExtent<'a, N> for ChunkMapReader<'a, N, T, M> where
    T: Copy,
    M: Clone,
    ArrayN<N, T>: Array<N>,
    PointN<N>: IntegerPoint + ChunkShape<N> + Eq + Hash,
    ExtentN<N>: IntegerExtent<N>, 
[src]

type Src = ArrayChunkCopySrc<'a, N, T>

type SrcIter = ArrayChunkCopySrcIter<'a, N, T>

impl<'a, N: 'a, T: 'a> ReadExtent<'a, N> for ArrayN<N, T> where
    PointN<N>: IntegerPoint
[src]

type Src = ArrayCopySrc<&'a ArrayN<N, T>>

type SrcIter = Once<(ExtentN<N>, Self::Src)>

Loading content...