Trait tuple::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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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,)

§

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>

§

type Output = T1<U>

source§

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

§

type Output = T2<U, U>

source§

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

§

type Output = T3<U, U, U>

source§

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

§

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

source§

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

§

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

source§

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

§

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

source§

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

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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