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));