[][src]Trait tuple_list::Tuple

pub trait Tuple {
    type TupleList: TupleList;
    fn into_tuple_list(self) -> Self::TupleList;
}

Trait providing conversion from tuple into tuple list.

Generic trait implemented for all tuples (up to 12 elements).

Please note that Tuple trait does not have TUPLE_SIZE constant like TupleList does.

This is intentional, in order to avoid accidental use of it for tuple lists.

You can still get tuple size as Tuple::TupleList::TUPLE_LIST_SIZE.

Examples

use crate::tuple_list::Tuple;
 
let tuple = (1, false, "abc");
 
assert_eq!(
    tuple.into_tuple_list(),
    (1, (false, ("abc", ()))),
);
Run

Associated Types

type TupleList: TupleList

Tuple list type corresponding to given tuple.

Loading content...

Required methods

fn into_tuple_list(self) -> Self::TupleList

Converts tuple into tuple list.

Loading content...

Implementations on Foreign Types

impl Tuple for ()[src]

impl<T1> Tuple for (T1,)[src]

type TupleList = (T1, ())

impl<T1, T2> Tuple for (T1, T2)[src]

type TupleList = (T1, (T2, ()))

impl<T1, T2, T3> Tuple for (T1, T2, T3)[src]

type TupleList = (T1, (T2, (T3, ())))

impl<T1, T2, T3, T4> Tuple for (T1, T2, T3, T4)[src]

type TupleList = (T1, (T2, (T3, (T4, ()))))

impl<T1, T2, T3, T4, T5> Tuple for (T1, T2, T3, T4, T5)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, ())))))

impl<T1, T2, T3, T4, T5, T6> Tuple for (T1, T2, T3, T4, T5, T6)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, ()))))))

impl<T1, T2, T3, T4, T5, T6, T7> Tuple for (T1, T2, T3, T4, T5, T6, T7)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, (T7, ())))))))

impl<T1, T2, T3, T4, T5, T6, T7, T8> Tuple for (T1, T2, T3, T4, T5, T6, T7, T8)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, ()))))))))

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> Tuple for (T1, T2, T3, T4, T5, T6, T7, T8, T9)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, ())))))))))

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Tuple for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, ()))))))))))

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tuple for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, ())))))))))))

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tuple for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)[src]

type TupleList = (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, (T12, ()))))))))))))

Loading content...

Implementors

Loading content...