ReadExtent

Trait ReadExtent 

Source
pub trait ReadExtent<'a, N> {
    type Src;
    type SrcIter: Iterator<Item = (ExtentN<N>, Self::Src)>;

    // Required method
    fn read_extent(&'a self, extent: &ExtentN<N>) -> Self::SrcIter;
}
Expand description

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.

Required Associated Types§

Source

type Src

Source

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

Required Methods§

Source

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

SrcIter must return extents that are subsets of extent.

Implementations on Foreign Types§

Source§

impl<'b, 'a, N, T> ReadExtent<'a, N> for &'b T
where T: 'b + ReadExtent<'a, N> + ?Sized,

Source§

type Src = <T as ReadExtent<'a, N>>::Src

Source§

type SrcIter = <T as ReadExtent<'a, N>>::SrcIter

Source§

fn read_extent( &'a self, extent: &ExtentN<N>, ) -> <&'b T as ReadExtent<'a, N>>::SrcIter

Source§

impl<'b, 'a, N, T> ReadExtent<'a, N> for &'b mut T
where T: 'b + ReadExtent<'a, N> + ?Sized,

Source§

type Src = <T as ReadExtent<'a, N>>::Src

Source§

type SrcIter = <T as ReadExtent<'a, N>>::SrcIter

Source§

fn read_extent( &'a self, extent: &ExtentN<N>, ) -> <&'b mut T as ReadExtent<'a, N>>::SrcIter

Implementors§

Source§

impl<'a, Delegate, N, F, In, Out, Bldr, Store> ReadExtent<'a, N> for TransformMap<'a, ChunkMapLodView<Delegate>, F>
where Delegate: Deref<Target = ChunkMap<N, In, Bldr, Store>>, PointN<N>: IntegerPoint<N>, Bldr: 'a + ChunkMapBuilder<N, In>, In: 'a + Copy, Store: 'a + ChunkReadStorage<N, <Bldr as ChunkMapBuilder<N, In>>::Chunk>, F: Copy + Fn(In) -> Out,

Source§

type Src = Either<ArrayCopySrc<TransformMap<'a, <Bldr as ChunkMapBuilder<N, In>>::Chunk, F>>, AmbientExtent<N, Out>>

Source§

type SrcIter = TransformChunkCopySrcIter<'a, N, F, In, <Bldr as ChunkMapBuilder<N, In>>::Chunk>

Source§

impl<'a, Delegate, N, T, Bldr, Store> ReadExtent<'a, N> for ChunkMapLodView<Delegate>
where Delegate: Deref<Target = ChunkMap<N, T, Bldr, Store>>, PointN<N>: IntegerPoint<N>, Bldr: 'a + ChunkMapBuilder<N, T>, T: 'a + Clone, Store: 'a + ChunkReadStorage<N, <Bldr as ChunkMapBuilder<N, T>>::Chunk>,

Source§

type Src = Either<ArrayCopySrc<&'a <Bldr as ChunkMapBuilder<N, T>>::Chunk>, AmbientExtent<N, T>>

Source§

type SrcIter = IntoIter<(ExtentN<N>, Either<ArrayCopySrc<&'a <Bldr as ChunkMapBuilder<N, T>>::Chunk>, AmbientExtent<N, T>>)>

Source§

impl<'a, F, N, T> ReadExtent<'a, N> for Func<F>
where F: 'a + Fn(PointN<N>) -> T, PointN<N>: IntegerPoint<N>,

Source§

type Src = &'a F

Source§

type SrcIter = Once<(ExtentN<N>, <Func<F> as ReadExtent<'a, N>>::Src)>

Source§

impl<'a, N, Chan> ReadExtent<'a, N> for Array<N, Chan>
where N: 'a, Chan: 'a, PointN<N>: IntegerPoint<N>,

Source§

type Src = ArrayCopySrc<&'a Array<N, Chan>>

Source§

type SrcIter = Once<(ExtentN<N>, <Array<N, Chan> as ReadExtent<'a, N>>::Src)>

Source§

impl<'a, N, Chan, F> ReadExtent<'a, N> for TransformMap<'a, Array<N, Chan>, F>
where TransformMap<'a, Array<N, Chan>, F>: IndexedArray<N> + Clone, PointN<N>: IntegerPoint<N>,

Source§

type Src = ArrayCopySrc<TransformMap<'a, Array<N, Chan>, F>>

Source§

type SrcIter = Once<(ExtentN<N>, <TransformMap<'a, Array<N, Chan>, F> as ReadExtent<'a, N>>::Src)>