pub trait ExtSliceMut<T>: ExtSlice<T> {
// Required methods
fn slice_lsplit_mut(&mut self, len: usize) -> &mut [T] ⓘ;
fn slice_rsplit_mut(&mut self, len: usize) -> &mut [T] ⓘ;
fn slice_msplit_left_mut(&mut self, len: usize) -> &mut [T] ⓘ;
fn slice_msplit_right_mut(&mut self, len: usize) -> &mut [T] ⓘ;
}
Expand description
Extension trait providing additional methods for &mut [T]
.
This trait is sealed and cannot be implemented for any other type.
Required Methods§
Sourcefn slice_lsplit_mut(&mut self, len: usize) -> &mut [T] ⓘ
fn slice_lsplit_mut(&mut self, len: usize) -> &mut [T] ⓘ
Returns a mutable left subslice of slice
with the given maximum len
.
If left_len > slice.len()
it returns the full slice.
Sourcefn slice_rsplit_mut(&mut self, len: usize) -> &mut [T] ⓘ
fn slice_rsplit_mut(&mut self, len: usize) -> &mut [T] ⓘ
Returns a mutable right subslice of slice
with the given maximum len
.
If left_len > slice.len()
it returns the full slice.
Sourcefn slice_msplit_left_mut(&mut self, len: usize) -> &mut [T] ⓘ
fn slice_msplit_left_mut(&mut self, len: usize) -> &mut [T] ⓘ
Returns a mutable middle subslice of slice
with the given maximum len
and a left bias.
In case of a non-perfect middle split, it will have one character more on the left.
If len > slice.len()
returns the full slice
.
Sourcefn slice_msplit_right_mut(&mut self, len: usize) -> &mut [T] ⓘ
fn slice_msplit_right_mut(&mut self, len: usize) -> &mut [T] ⓘ
Returns a mutable middle subslice of slice
with the given maximum len
and a right bias.
In case of a non-perfect middle split, it will have one character more on the right.
If len > slice.len()
returns the full slice
.
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.