TupleList

Trait TupleList 

Source
pub trait TupleList
where Self: Sized,
{ type Tuple: Tuple<TupleList = Self>; const TUPLE_LIST_SIZE: usize; // Required method 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 Constants§

Source

const TUPLE_LIST_SIZE: usize

Constant representing tuple list size.

Required Associated Types§

Source

type Tuple: Tuple<TupleList = Self>

Tuple type corresponding to given tuple list.

Required Methods§

Source

fn into_tuple(self) -> Self::Tuple

Converts tuple list into tuple.

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 TupleList for ()

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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, ())))))))))))

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, ()))))))))))))

Implementors§