Trait shrimple_parser::tuple::SliceTuple
source · pub trait SliceTuple<const N: usize>: Sized + Tuple {
type FirstN;
type FirstNStripped;
// Required methods
fn first_n(this: Self) -> Self::FirstN;
fn strip_first_n(this: Self) -> Self::FirstNStripped;
fn split(this: Self) -> (Self::FirstN, Self::FirstNStripped);
}Expand description
The trait for a tuple that has at least N elements, the backbone of the [first_n] function.
The associated functions are not to be used directly, instead use the equivalent functions
or methods of the Tuple trait.
Required Associated Types§
sourcetype FirstNStripped
type FirstNStripped
A tuple with the first N elements of the original tuple.
Required Methods§
sourcefn strip_first_n(this: Self) -> Self::FirstNStripped
fn strip_first_n(this: Self) -> Self::FirstNStripped
Returns the tuple without the first N elements
sourcefn split(this: Self) -> (Self::FirstN, Self::FirstNStripped)
fn split(this: Self) -> (Self::FirstN, Self::FirstNStripped)
Splits the tuple into 2, with the 1st tuple having the 1st N element, and the 2nd tuple having the rest.
Object Safety§
This trait is not object safe.