Skip to main content

MapIntern

Trait MapIntern 

Source
pub trait MapIntern {
    type Item;

    // Required method
    fn map_intern<F>(self, f: F) -> Self
       where F: FnMut(Self::Item) -> Self::Item;
}
Expand description

Similar to Iterator::map, but for container-like types that keep their shape.

Required Associated Types§

Required Methods§

Source

fn map_intern<F>(self, f: F) -> Self
where F: FnMut(Self::Item) -> Self::Item,

Apply f to each item, producing a new container of the same type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> MapIntern for Vec<T>

Source§

type Item = T

Source§

fn map_intern<F>(self, f: F) -> Vec<T>
where F: FnMut(<Vec<T> as MapIntern>::Item) -> <Vec<T> as MapIntern>::Item,

Source§

impl<T, const N: usize> MapIntern for [T; N]

Source§

type Item = T

Source§

fn map_intern<F>(self, f: F) -> [T; N]
where F: FnMut(<[T; N] as MapIntern>::Item) -> <[T; N] as MapIntern>::Item,

Implementors§

Source§

impl<'a, G, T, Idx, const N: usize> MapIntern for GridViewMut<'a, G, T, Idx, N>
where G: IGrid<T, Idx, N>, Idx: Integer,

Source§

type Item = T

Source§

impl<T> MapIntern for CameraOf<T>

Source§

type Item = T

Source§

impl<T> MapIntern for HslaOf<T>

Source§

type Item = T

Source§

impl<T> MapIntern for RgbaOf<T>

Source§

type Item = T

Source§

impl<T> MapIntern for RectangleOf<T>

Source§

type Item = T

Source§

impl<T, Idx> MapIntern for ImageBaseOf<T, Idx>
where Idx: Integer,

Source§

type Item = T

Source§

impl<T, Idx, const N: usize> MapIntern for GridOf<T, Idx, N>
where Idx: Integer,

Source§

type Item = T

Source§

impl<T, const N: usize> MapIntern for Vector<T, N>

Source§

type Item = T

Source§

impl<T, const ROW: usize, const COL: usize> MapIntern for Matrix<T, ROW, COL>

Source§

type Item = T