Trait len_trait::index::SplitAt
[−]
[src]
pub trait SplitAt<Idx>: IndexRange<Idx> { fn split_at(&self, index: Idx) -> (&Self::Output, &Self::Output); }
A trait for splitting a collection into two pieces at a given index.
Splitting a collection must take a constant amount of time and space.
Required Methods
fn split_at(&self, index: Idx) -> (&Self::Output, &Self::Output)
Splits the collection into two pieces at the given index.
Panics
Panics if index
is invalid according to the collection.