pub trait TupleRemove<Idx> {
type Type;
type Remainder;
// Required method
fn remove(self) -> (Self::Type, Self::Remainder);
}Expand description
A trait for removing an element at a specific index from a tuple.
This trait allows removing an element at compile-time known index Idx
from a tuple, returning the element and the remaining tuple.
§Examples
use tuplities_remove::TupleRemove;
use typenum::U1;
let tuple = (1, "hello", 3.14);
let (removed, remainder) = TupleRemove::<U1>::remove(tuple);
assert_eq!(removed, "hello");
assert_eq!(remainder, (1, 3.14));Part of the tuplities crate.