Trait SplitAtMut

Source
pub trait SplitAtMut<Idx>: IndexRangeMut<Idx> + SplitAt<Idx> {
    // Required method
    fn split_at_mut(
        &mut self,
        index: Idx,
    ) -> (&mut <Self as Index<RangeFull>>::Output, &mut <Self as Index<RangeFull>>::Output);
}
Expand description

A trait for splitting a collection into two mutable pieces at a given index.

Splitting a collection must take a constant amount of time and space.

Required Methods§

Source

fn split_at_mut( &mut self, index: Idx, ) -> (&mut <Self as Index<RangeFull>>::Output, &mut <Self as Index<RangeFull>>::Output)

Splits the collection into two mutable pieces at the given index.

§Panics

Panics if index is invalid according to the collection.

Implementations on Foreign Types§

Source§

impl SplitAtMut<usize> for str

Source§

fn split_at_mut(&mut self, index: usize) -> (&mut Self, &mut Self)

Source§

impl<T> SplitAtMut<usize> for [T]

Source§

fn split_at_mut(&mut self, index: usize) -> (&mut Self, &mut Self)

Implementors§