Trait shrimple_parser::tuple::IndexTuple
source · pub trait IndexTuple<const N: usize>: Sized + Tuple {
type Nth;
type NthMapped<U>;
// Required methods
fn nth(this: Self) -> Self::Nth;
fn nth_ref(this: &Self) -> &Self::Nth;
fn map_nth<U>(
this: Self,
f: impl FnOnce(Self::Nth) -> U
) -> Self::NthMapped<U>;
}Expand description
The trait for a tuple that has the N-th element, the backbone of the [nth] function.
The associated functions are not to be used directly, instead use the equivalent functions
or methods of the Tuple trait.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.