[−][src]Struct building_blocks::prelude::TransformMap
A lattice map that delegates look-ups to a different lattice map, then transforms the result
using some Fn(T) -> S
.
Implementations
impl<'a, M, F> TransformMap<'a, M, F>
[src]
pub fn new(delegate: &'a M, transform: F) -> TransformMap<'a, M, F>
[src]
Trait Implementations
impl<'a, N, M, F> Array<N> for TransformMap<'a, M, F> where
M: Array<N>,
[src]
M: Array<N>,
type Indexer = <M as Array<N>>::Indexer
pub fn extent(&self) -> &ExtentN<N>
[src]
fn for_each_point_and_stride(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, Stride)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, Stride)
)
fn stride_from_local_point(&self, p: &Local<N>) -> Stride
[src]
fn strides_from_local_points(&self, points: &[Local<N>], strides: &mut [Stride])
[src]
impl<'a, M, F> Clone for TransformMap<'a, M, F> where
F: Clone,
[src]
F: Clone,
pub fn clone(&self) -> TransformMap<'a, M, F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, M, F> Copy for TransformMap<'a, M, F> where
F: Copy,
[src]
F: Copy,
impl<'a, M, F, N, T, S, Coord> ForEach<N, Coord> for TransformMap<'a, M, F> where
F: Fn(T) -> S,
M: ForEach<N, Coord, Data = T>,
[src]
F: Fn(T) -> S,
M: ForEach<N, Coord, Data = T>,
type Data = S
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(Coord, <TransformMap<'a, M, F> as ForEach<N, Coord>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(Coord, <TransformMap<'a, M, F> as ForEach<N, Coord>>::Data)
)
impl<'a, M, F, T, S, Coord> Get<Coord> for TransformMap<'a, M, F> where
F: Fn(T) -> S,
M: Get<Coord, Data = T>,
[src]
F: Fn(T) -> S,
M: Get<Coord, Data = T>,
impl<'a, M, F, T, S, Coord> GetUnchecked<Coord> for TransformMap<'a, M, F> where
F: Fn(T) -> S,
M: GetUnchecked<Coord, Data = T>,
[src]
F: Fn(T) -> S,
M: GetUnchecked<Coord, Data = T>,
type Data = S
pub unsafe fn get_unchecked(&self, c: Coord) -> S
[src]
impl<'a, F, S, N, T, M> ReadExtent<'a, N> for TransformMap<'a, ChunkMapReader<'a, N, S, M>, F> where
F: 'a + Copy + Fn(S) -> T,
M: Clone,
S: Copy,
T: 'a,
ChunkMapReader<'a, N, S, M>: ReadExtent<'a, N>,
PointN<N>: Point,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
<ChunkMapReader<'a, N, S, M> as ReadExtent<'a, N>>::Src == Either<ArrayCopySrc<&'a ArrayN<N, S>>, AmbientExtent<N, S>>,
<ChunkMapReader<'a, N, S, M> as ReadExtent<'a, N>>::SrcIter == IntoIter<(ExtentN<N>, Either<ArrayCopySrc<&'a ArrayN<N, S>>, AmbientExtent<N, S>>)>,
[src]
F: 'a + Copy + Fn(S) -> T,
M: Clone,
S: Copy,
T: 'a,
ChunkMapReader<'a, N, S, M>: ReadExtent<'a, N>,
PointN<N>: Point,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
<ChunkMapReader<'a, N, S, M> as ReadExtent<'a, N>>::Src == Either<ArrayCopySrc<&'a ArrayN<N, S>>, AmbientExtent<N, S>>,
<ChunkMapReader<'a, N, S, M> as ReadExtent<'a, N>>::SrcIter == IntoIter<(ExtentN<N>, Either<ArrayCopySrc<&'a ArrayN<N, S>>, AmbientExtent<N, S>>)>,
type Src = Either<ArrayCopySrc<TransformMap<'a, ArrayN<N, S>, F>>, AmbientExtent<N, T>>
type SrcIter = TransformChunkCopySrcIter<'a, F, S, N, T>
pub fn read_extent(
&'a self,
extent: &ExtentN<N>
) -> <TransformMap<'a, ChunkMapReader<'a, N, S, M>, F> as ReadExtent<'a, N>>::SrcIter
[src]
&'a self,
extent: &ExtentN<N>
) -> <TransformMap<'a, ChunkMapReader<'a, N, S, M>, F> as ReadExtent<'a, N>>::SrcIter
impl<'a, F, S, N, T> ReadExtent<'a, N> for TransformMap<'a, ArrayN<N, S>, F> where
F: 'a + Fn(S) -> T,
TransformMap<'a, ArrayN<N, S>, F>: Array<N>,
TransformMap<'a, ArrayN<N, S>, F>: Copy,
PointN<N>: IntegerPoint,
[src]
F: 'a + Fn(S) -> T,
TransformMap<'a, ArrayN<N, S>, F>: Array<N>,
TransformMap<'a, ArrayN<N, S>, F>: Copy,
PointN<N>: IntegerPoint,
type Src = ArrayCopySrc<TransformMap<'a, ArrayN<N, S>, F>>
type SrcIter = Once<(ExtentN<N>, <TransformMap<'a, ArrayN<N, S>, F> as ReadExtent<'a, N>>::Src)>
pub fn read_extent(
&'a self,
extent: &ExtentN<N>
) -> <TransformMap<'a, ArrayN<N, S>, F> as ReadExtent<'a, N>>::SrcIter
[src]
&'a self,
extent: &ExtentN<N>
) -> <TransformMap<'a, ArrayN<N, S>, F> as ReadExtent<'a, N>>::SrcIter
Auto Trait Implementations
impl<'a, M, F> RefUnwindSafe for TransformMap<'a, M, F> where
F: RefUnwindSafe,
M: RefUnwindSafe,
F: RefUnwindSafe,
M: RefUnwindSafe,
impl<'a, M, F> Send for TransformMap<'a, M, F> where
F: Send,
M: Sync,
F: Send,
M: Sync,
impl<'a, M, F> Sync for TransformMap<'a, M, F> where
F: Sync,
M: Sync,
F: Sync,
M: Sync,
impl<'a, M, F> Unpin for TransformMap<'a, M, F> where
F: Unpin,
F: Unpin,
impl<'a, M, F> UnwindSafe for TransformMap<'a, M, F> where
F: UnwindSafe,
M: RefUnwindSafe,
F: UnwindSafe,
M: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<'a, F, N, T> ForEach<N, PointN<N>> for F where
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
[src]
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
type Data = T
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
impl<T> From<T> for T
[src]
impl<F, T, Coord> Get<Coord> for F where
F: Fn(Coord) -> T,
[src]
F: Fn(Coord) -> T,
impl<M, L, T> GetUncheckedRelease<L, T> for M where
M: Get<L, Data = T> + GetUnchecked<L, Data = T>,
[src]
M: Get<L, Data = T> + GetUnchecked<L, Data = T>,
fn get_unchecked_release(&self, location: L) -> T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<'a, F, N, T> ReadExtent<'a, N> for F where
F: 'a + Fn(&PointN<N>) -> T,
ExtentN<N>: Copy,
PointN<N>: Point,
[src]
F: 'a + Fn(&PointN<N>) -> T,
ExtentN<N>: Copy,
PointN<N>: Point,
type Src = &'a F
type SrcIter = Once<(ExtentN<N>, <F as ReadExtent<'a, N>>::Src)>
pub fn read_extent(
&'a self,
extent: &ExtentN<N>
) -> <F as ReadExtent<'a, N>>::SrcIter
[src]
&'a self,
extent: &ExtentN<N>
) -> <F as ReadExtent<'a, N>>::SrcIter
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,