Trait TupleZip

Source
pub trait TupleZip<T> {
    type Output;

    // Required method
    fn zip(self, val: T) -> Self::Output;
}
Expand description

Zip a tuple with another single value.

For concating two tuples, see TupleConcat for more details.

§Example

use rs_std_ext::tuple::TupleZip;

let x = (10u8, 'a');
let y = x.zip(-5i32);

assert_eq!(y, (10u8, 'a', -5i32));

Required Associated Types§

Required Methods§

Source

fn zip(self, val: T) -> Self::Output

Zip with another single value.

Implementations on Foreign Types§

§

impl<A, B, C, D, E, F, G, H, I, J, Z> TupleZip<Z> for (A, B, C, D, E, F, G, H, I, J)

§

type Output = (A, B, C, D, E, F, G, H, I, J, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, D, E, F, G, H, I, Z> TupleZip<Z> for (A, B, C, D, E, F, G, H, I)

§

type Output = (A, B, C, D, E, F, G, H, I, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, D, E, F, G, H, Z> TupleZip<Z> for (A, B, C, D, E, F, G, H)

§

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

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, D, E, F, G, Z> TupleZip<Z> for (A, B, C, D, E, F, G)

§

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

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, D, E, F, Z> TupleZip<Z> for (A, B, C, D, E, F)

§

type Output = (A, B, C, D, E, F, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, D, E, Z> TupleZip<Z> for (A, B, C, D, E)

§

type Output = (A, B, C, D, E, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, D, Z> TupleZip<Z> for (A, B, C, D)

§

type Output = (A, B, C, D, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, C, Z> TupleZip<Z> for (A, B, C)

§

type Output = (A, B, C, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, B, Z> TupleZip<Z> for (A, B)

§

type Output = (A, B, Z)

§

fn zip(self, val: Z) -> Self::Output

§

impl<A, Z> TupleZip<Z> for (A,)

§

type Output = (A, Z)

§

fn zip(self, val: Z) -> Self::Output

Implementors§