TupleInsert

Trait TupleInsert 

Source
pub trait TupleInsert<Idx: Unsigned, T> {
    type Output;

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

A trait for inserting an element at a specific index into a tuple.

This trait allows inserting an element at compile-time known index Idx into a tuple, returning the tuple with the element inserted.

§Examples

use tuplities_insert::TupleInsert;
use typenum::U1;

let tuple = (1, 3.14);
let inserted = TupleInsert::<U1, _>::insert(tuple, "hello");
assert_eq!(inserted, (1, "hello", 3.14));

Part of the tuplities crate.

Required Associated Types§

Source

type Output

The type of the tuple after inserting the element.

Required Methods§

Source

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

Inserts the element at index Idx into the tuple.

Returns the tuple with the element inserted at the specified index.

Implementations on Foreign Types§

Source§

impl<T> TupleInsert<UTerm, T> for ()

Source§

type Output = (T,)

Source§

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

Source§

impl<T, T1> TupleInsert<UInt<UTerm, B1>, T> for (T1,)

Source§

type Output = (T1, T)

Source§

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

Source§

impl<T, T1> TupleInsert<UTerm, T> for (T1,)

Source§

type Output = (T, T1)

Source§

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

Source§

impl<T, T1, T2> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2)

Source§

type Output = (T1, T2, T)

Source§

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

Source§

impl<T, T1, T2> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2)

Source§

type Output = (T1, T, T2)

Source§

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

Source§

impl<T, T1, T2> TupleInsert<UTerm, T> for (T1, T2)

Source§

type Output = (T, T1, T2)

Source§

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

Source§

impl<T, T1, T2, T3> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2, T3)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3> TupleInsert<UInt<UInt<UTerm, B1>, B1>, T> for (T1, T2, T3)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2, T3)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3> TupleInsert<UTerm, T> for (T1, T2, T3)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3, T4> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, T> for (T1, T2, T3, T4)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3, T4> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2, T3, T4)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3, T4> TupleInsert<UInt<UInt<UTerm, B1>, B1>, T> for (T1, T2, T3, T4)

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3, T4> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2, T3, T4)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T, T1, T2, T3, T4, T5> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, T> for (T1, T2, T3, T4, T5)

Source§

impl<T, T1, T2, T3, T4, T5> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, T> for (T1, T2, T3, T4, T5)

Source§

impl<T, T1, T2, T3, T4, T5> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2, T3, T4, T5)

Source§

impl<T, T1, T2, T3, T4, T5> TupleInsert<UInt<UInt<UTerm, B1>, B1>, T> for (T1, T2, T3, T4, T5)

Source§

impl<T, T1, T2, T3, T4, T5> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2, T3, T4, T5)

Source§

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

Source§

impl<T, T1, T2, T3, T4, T5, T6> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, T> for (T1, T2, T3, T4, T5, T6)

Source§

impl<T, T1, T2, T3, T4, T5, T6> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, T> for (T1, T2, T3, T4, T5, T6)

Source§

impl<T, T1, T2, T3, T4, T5, T6> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, T> for (T1, T2, T3, T4, T5, T6)

Source§

impl<T, T1, T2, T3, T4, T5, T6> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2, T3, T4, T5, T6)

Source§

impl<T, T1, T2, T3, T4, T5, T6> TupleInsert<UInt<UInt<UTerm, B1>, B1>, T> for (T1, T2, T3, T4, T5, T6)

Source§

impl<T, T1, T2, T3, T4, T5, T6> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2, T3, T4, T5, T6)

Source§

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

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UInt<UTerm, B1>, B1>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2, T3, T4, T5, T6, T7)

Source§

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

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UTerm, B1>, B0>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UInt<UTerm, B1>, B1>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T, T1, T2, T3, T4, T5, T6, T7, T8> TupleInsert<UInt<UTerm, B1>, T> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

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

Implementors§