TupleMap1

Trait TupleMap1 

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

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

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

Required Associated Types§

Required Methods§

Source

fn map_1<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<B, C, D, E, F, G, H, T, U> TupleMap1<T, U> for (T, B, C, D, E, F, G, H)

Source§

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

Source§

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

Source§

impl<B, C, D, E, F, G, T, U> TupleMap1<T, U> for (T, B, C, D, E, F, G)

Source§

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

Source§

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

Source§

impl<B, C, D, E, F, T, U> TupleMap1<T, U> for (T, B, C, D, E, F)

Source§

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

Source§

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

Source§

impl<B, C, D, E, T, U> TupleMap1<T, U> for (T, B, C, D, E)

Source§

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

Source§

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

Source§

impl<B, C, D, T, U> TupleMap1<T, U> for (T, B, C, D)

Source§

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

Source§

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

Source§

impl<B, C, T, U> TupleMap1<T, U> for (T, B, C)

Source§

type Output = (U, B, C)

Source§

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

Source§

impl<B, T, U> TupleMap1<T, U> for (T, B)

Source§

type Output = (U, B)

Source§

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

Source§

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

Source§

type Output = (U,)

Source§

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

Implementors§