TuplePushBack

Trait TuplePushBack 

Source
pub trait TuplePushBack<T> {
    type Output;

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

A trait for tuples that allows pushing an element to the back.

Required Associated Types§

Source

type Output

The type of the tuple after adding T to the back.

Required Methods§

Source

fn push_back(self, value: T) -> Self::Output

Consumes the tuple and appends the given value, returning the new tuple.

§Examples
use tuplities_push_back::TuplePushBack;

let tuple = ("hello",);
let new_tuple = tuple.push_back("world");
assert_eq!(new_tuple, ("hello", "world"));

Part of the tuplities crate.

Implementations on Foreign Types§

Source§

impl<T> TuplePushBack<T> for ()

Source§

type Output = (T,)

Source§

fn push_back(self, value: T) -> Self::Output

Source§

impl<T, T1> TuplePushBack<T> for (T1,)

Source§

type Output = (T1, T)

Source§

fn push_back(self, value: T) -> Self::Output

Source§

impl<T, T1, T2> TuplePushBack<T> for (T1, T2)

Source§

type Output = (T1, T2, T)

Source§

fn push_back(self, value: T) -> Self::Output

Source§

impl<T, T1, T2, T3> TuplePushBack<T> for (T1, T2, T3)

Source§

type Output = (T1, T2, T3, T)

Source§

fn push_back(self, value: T) -> Self::Output

Source§

impl<T, T1, T2, T3, T4> TuplePushBack<T> for (T1, T2, T3, T4)

Source§

impl<T, T1, T2, T3, T4, T5> TuplePushBack<T> for (T1, T2, T3, T4, T5)

Source§

impl<T, T1, T2, T3, T4, T5, T6> TuplePushBack<T> for (T1, T2, T3, T4, T5, T6)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TuplePushBack<T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TuplePushBack<T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Implementors§