Trait linera_witty::Split

source ·
pub trait Split<Target> {
    type Remainder;

    // Required method
    fn split(self) -> (Target, Self::Remainder);
}
Expand description

Compile time splitting of heterogeneous lists.

Allows splitting a heterogeneous list at a certain point, determined by the Target type, which should match this list type until a certain element. The list after that point is returned as the Remainder type.

Required Associated Types§

source

type Remainder

The tail of remaining elements after splitting up the list.

Required Methods§

source

fn split(self) -> (Target, Self::Remainder)

Splits the current heterogeneous list in two.

Implementors§

source§

impl<AnyTail> Split<HNil> for AnyTail

§

type Remainder = AnyTail

source§

impl<Head, SourceTail, TargetTail> Split<HCons<Head, TargetTail>> for HCons<Head, SourceTail>
where SourceTail: Split<TargetTail>,

§

type Remainder = <SourceTail as Split<TargetTail>>::Remainder