Trait variadics::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

Object Safety§

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