pub trait TupleList: Sized {
    type Tuple: Tuple<TupleList = Self>;

    const TUPLE_LIST_SIZE: usize;

    fn into_tuple(self) -> Self::Tuple;
}
Expand description

Trait providing conversion from tuple list into tuple.

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

Examples

use crate::tuple_list::tuple_list;
use crate::tuple_list::TupleList;
 
let tuple_list = tuple_list!(1, false, "abc");
 
assert_eq!(
    tuple_list.into_tuple(),
    (1, false, "abc"),
);

Required Associated Types§

source

type Tuple: Tuple<TupleList = Self>

Tuple type corresponding to given tuple list.

Required Associated Constants§

source

const TUPLE_LIST_SIZE: usize

Constant representing tuple list size.

Required Methods§

source

fn into_tuple(self) -> Self::Tuple

Converts tuple list into tuple.

Implementations on Foreign Types§

source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> TupleList for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, ())))))))))

§

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

source§

const TUPLE_LIST_SIZE: usize = 9usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, ()))))))))) as TupleList>::Tuple

source§

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

§

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

source§

const TUPLE_LIST_SIZE: usize = 5usize

source§

fn into_tuple(self) -> <(T1, (T2, (T3, (T4, (T5, ()))))) as TupleList>::Tuple

source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TupleList for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, ()))))))))))

§

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

source§

const TUPLE_LIST_SIZE: usize = 10usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, ())))))))))) as TupleList>::Tuple

source§

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

§

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

source§

const TUPLE_LIST_SIZE: usize = 6usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, ())))))) as TupleList>::Tuple

source§

impl TupleList for ()

source§

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

§

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

source§

const TUPLE_LIST_SIZE: usize = 8usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, ())))))))) as TupleList>::Tuple

source§

impl<T1, T2, T3, T4> TupleList for (T1, (T2, (T3, (T4, ()))))

§

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

source§

const TUPLE_LIST_SIZE: usize = 4usize

source§

fn into_tuple(self) -> <(T1, (T2, (T3, (T4, ())))) as TupleList>::Tuple

source§

impl<T1> TupleList for (T1, ())

§

type Tuple = (T1,)

source§

const TUPLE_LIST_SIZE: usize = 1usize

source§

fn into_tuple(self) -> <(T1, ()) as TupleList>::Tuple

source§

impl<T1, T2> TupleList for (T1, (T2, ()))

§

type Tuple = (T1, T2)

source§

const TUPLE_LIST_SIZE: usize = 2usize

source§

fn into_tuple(self) -> <(T1, (T2, ())) as TupleList>::Tuple

source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TupleList for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, ())))))))))))

§

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

source§

const TUPLE_LIST_SIZE: usize = 11usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, ()))))))))))) as TupleList>::Tuple

source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TupleList for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, (T12, ()))))))))))))

§

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

source§

const TUPLE_LIST_SIZE: usize = 12usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, (T12, ())))))))))))) as TupleList>::Tuple

source§

impl<T1, T2, T3> TupleList for (T1, (T2, (T3, ())))

§

type Tuple = (T1, T2, T3)

source§

const TUPLE_LIST_SIZE: usize = 3usize

source§

fn into_tuple(self) -> <(T1, (T2, (T3, ()))) as TupleList>::Tuple

source§

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

§

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

source§

const TUPLE_LIST_SIZE: usize = 7usize

source§

fn into_tuple(
    self
) -> <(T1, (T2, (T3, (T4, (T5, (T6, (T7, ()))))))) as TupleList>::Tuple

Implementors§