TupleMap2

Trait TupleMap2 

Source
pub trait TupleMap2<T, U> {
    type Output;

    // Required method
    fn map_2<Func>(self, f: Func) -> Self::Output
       where Func: FnOnce(T) -> U;
}
Expand description

Allows to map the second element of a tuple to another type.

Required Associated Types§

Required Methods§

Source

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

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<A, C, D, E, F, G, H, T, U> TupleMap2<T, U> for (A, T, C, D, E, F, G, H)

Source§

type Output = (A, U, C, D, E, F, G, H)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Source§

impl<A, C, D, E, F, G, T, U> TupleMap2<T, U> for (A, T, C, D, E, F, G)

Source§

type Output = (A, U, C, D, E, F, G)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Source§

impl<A, C, D, E, F, T, U> TupleMap2<T, U> for (A, T, C, D, E, F)

Source§

type Output = (A, U, C, D, E, F)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Source§

impl<A, C, D, E, T, U> TupleMap2<T, U> for (A, T, C, D, E)

Source§

type Output = (A, U, C, D, E)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Source§

impl<A, C, D, T, U> TupleMap2<T, U> for (A, T, C, D)

Source§

type Output = (A, U, C, D)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Source§

impl<A, C, T, U> TupleMap2<T, U> for (A, T, C)

Source§

type Output = (A, U, C)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Source§

impl<A, T, U> TupleMap2<T, U> for (A, T)

Source§

type Output = (A, U)

Source§

fn map_2<Func>(self, f: Func) -> Self::Output
where Func: FnOnce(T) -> U,

Implementors§