multiversx_sc::tuple_util

Trait NestedTupleFlatten

Source
pub trait NestedTupleFlatten: NestedTuple {
    type Flattened;
    type Unpacked;

    // Required methods
    fn flatten(self) -> Self::Flattened;
    fn flatten_unpack(self) -> Self::Unpacked;
}
Expand description

Defines conversion of a nested tuple list to a regular tuple.

Required Associated Types§

Required Methods§

Source

fn flatten(self) -> Self::Flattened

Converts a nested tuple list to a regular tuple.

Source

fn flatten_unpack(self) -> Self::Unpacked

Same as flatten, converts a nested tuple list to a regular tuple, but additionally, it unpacks singleton tuples into their content ((item,) -> item).

Implementations on Foreign Types§

Source§

impl NestedTupleFlatten for ()

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> NestedTupleFlatten 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> NestedTupleFlatten for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, (T12, ()))))))))))))

Source§

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

Source§

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

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> NestedTupleFlatten for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, (T12, (T13, (T14, (T15, ())))))))))))))))

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> NestedTupleFlatten for (T1, (T2, (T3, (T4, (T5, (T6, (T7, (T8, (T9, (T10, (T11, (T12, (T13, (T14, (T15, (T16, ()))))))))))))))))

Source§

impl<T> NestedTupleFlatten for (T, ())

Implementors§