Skip to main content

Map

Trait Map 

Source
pub trait Map: Copy + Send {
    type I;
    type O;

    // Required method
    fn map(&self, i: Self::I) -> Self::O;
}
Expand description

Function-like mapper from one value to one value.

Required Associated Types§

Source

type I

Input type.

Source

type O

Output type.

Required Methods§

Source

fn map(&self, i: Self::I) -> Self::O

Maps one input value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, I: Clone> Map for FnCloned<'a, I>

Source§

type I = &'a I

Source§

type O = I

Source§

impl<'a, I: Copy> Map for FnCopied<'a, I>

Source§

type I = &'a I

Source§

type O = I

Source§

impl<I, F: Fn(&I) + Copy + Send> Map for FnIns<I, F>

Source§

type I = I

Source§

type O = I

Source§

impl<I, O, F: Fn(I) -> O + Copy + Send> Map for FnMap<I, O, F>

Source§

type I = I

Source§

type O = O

Source§

impl<M: Map> Map for MapEnum<M>

Source§

type I = (usize, <M as Map>::I)

Source§

type O = (usize, <M as Map>::O)