SplitOff

Trait SplitOff 

Source
pub trait SplitOff {
    // Required method
    fn split_off(&mut self, mid: usize) -> Self;
}
Expand description

A helper trait to split owned sets into two sets at a given index. This trait is used to implement iteration over Chunkeds.

Required Methods§

Source

fn split_off(&mut self, mid: usize) -> Self

Split self into two sets at the given midpoint. This function is analogous to Vec::split_off. self contains elements [0, mid), and The returned Self contains elements [mid, len).

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<S, T> SplitOff for (S, T)
where S: SplitOff, T: SplitOff,

Source§

fn split_off(&mut self, mid: usize) -> Self

Source§

impl<T> SplitOff for Vec<T>

Source§

fn split_off(&mut self, mid: usize) -> Self

Implementors§