Trait Map

Source
pub trait Map<T>: TupleElements {
    type Output: TupleElements<Element = T>;

    // Required methods
    fn map<F>(self, f: F) -> Self::Output
       where F: Fn(Self::Element) -> T;
    fn map_mut<F>(self, f: F) -> Self::Output
       where F: FnMut(Self::Element) -> T;
}

Required Associated Types§

Source

type Output: TupleElements<Element = T>

Required Methods§

Source

fn map<F>(self, f: F) -> Self::Output
where F: Fn(Self::Element) -> T,

apply a function to each element and return the result

Source

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(Self::Element) -> T,

same as map, but accepts a FnMut

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, U> Map<U> for (T, T)

Source§

type Output = (U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T)

Source§

type Output = (U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T)

Source§

type Output = (U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T)

Source§

type Output = (U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)

Source§

type Output = (U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Source§

impl<T, U> Map<U> for (T,)

Source§

type Output = (U,)

Source§

fn map<F>(self, f: F) -> Self::Output
where F: Fn(T) -> U,

Source§

fn map_mut<F>(self, f: F) -> Self::Output
where F: FnMut(T) -> U,

Implementors§

Source§

impl<T, U> Map<U> for T1<T>

Source§

type Output = T1<U>

Source§

impl<T, U> Map<U> for T2<T, T>

Source§

type Output = T2<U, U>

Source§

impl<T, U> Map<U> for T3<T, T, T>

Source§

type Output = T3<U, U, U>

Source§

impl<T, U> Map<U> for T4<T, T, T, T>

Source§

type Output = T4<U, U, U, U>

Source§

impl<T, U> Map<U> for T5<T, T, T, T, T>

Source§

type Output = T5<U, U, U, U, U>

Source§

impl<T, U> Map<U> for T6<T, T, T, T, T, T>

Source§

type Output = T6<U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T7<T, T, T, T, T, T, T>

Source§

type Output = T7<U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T8<T, T, T, T, T, T, T, T>

Source§

type Output = T8<U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T9<T, T, T, T, T, T, T, T, T>

Source§

type Output = T9<U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T10<T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T10<U, U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T11<T, T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T11<U, U, U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T12<T, T, T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T12<U, U, U, U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T13<T, T, T, T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T13<U, U, U, U, U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T14<T, T, T, T, T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T14<U, U, U, U, U, U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T15<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T15<U, U, U, U, U, U, U, U, U, U, U, U, U, U, U>

Source§

impl<T, U> Map<U> for T16<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T>

Source§

type Output = T16<U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U>