Trait Split

Source
pub trait Split<Prefix>: VariadicExt + Sealed<Prefix>
where Prefix: VariadicExt,
{ type Suffix: VariadicExt; // Required methods fn split(self) -> (Prefix, Self::Suffix); fn split_ref( this: Self::AsRefVar<'_>, ) -> (Prefix::AsRefVar<'_>, <Self::Suffix as VariadicExt>::AsRefVar<'_>); }
Expand description

Helper trait for splitting a variadic into two parts. Prefix is the first part, everything after is the Suffix or second part.

This is a sealed trait.

Required Associated Types§

Source

type Suffix: VariadicExt

The second part when splitting this variadic by Prefix.

Required Methods§

Source

fn split(self) -> (Prefix, Self::Suffix)

Splits this variadic into two parts, first the Prefix, and second the Suffix.

Source

fn split_ref( this: Self::AsRefVar<'_>, ) -> (Prefix::AsRefVar<'_>, <Self::Suffix as VariadicExt>::AsRefVar<'_>)

Splits a refvar variadic

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Item, Rest, PrefixRest> Split<(Item, PrefixRest)> for (Item, Rest)
where PrefixRest: VariadicExt, Rest: Split<PrefixRest>,

Source§

type Suffix = <Rest as Split<PrefixRest>>::Suffix

The second part when splitting this variadic by Prefix.

Source§

fn split(self) -> ((Item, PrefixRest), Self::Suffix)

Splits this variadic into two parts, first the Prefix, and second the Suffix.

Source§

fn split_ref( this: Self::AsRefVar<'_>, ) -> (<(Item, PrefixRest) as VariadicExt>::AsRefVar<'_>, <Self::Suffix as VariadicExt>::AsRefVar<'_>)

Splits a refvar variadic

Implementors§

Source§

impl<Rest> Split<()> for Rest
where Rest: VariadicExt,

Source§

type Suffix = Rest