pub trait SliceByValueSubsliceRangeMut<R: ComposeRange>: for<'a> SliceByValueSubsliceGatMut<'a> {
// Required method
unsafe fn get_subslice_unchecked_mut(
&mut self,
range: R,
) -> SubsliceMut<'_, Self>;
// Provided methods
fn index_subslice_mut(&mut self, range: R) -> SubsliceMut<'_, Self> { ... }
fn get_subslice_mut(&mut self, range: R) -> Option<SubsliceMut<'_, Self>> { ... }
}Expand description
A trait implementing mutable subslicing for a specific range parameter.
The user should never see this trait. SliceByValueSubsliceMut combines
all instances of this trait with R equal to the various kind of standard
ranges (core::ops::Range, core::ops::RangeFull, etc.).
The only method that must be implemented is
get_subslice_unchecked_mut.
Required Methods§
Sourceunsafe fn get_subslice_unchecked_mut(
&mut self,
range: R,
) -> SubsliceMut<'_, Self>
unsafe fn get_subslice_unchecked_mut( &mut self, range: R, ) -> SubsliceMut<'_, Self>
See slice::get_unchecked.
For a safe alternative see
get_subslice_mut or
index_subslice_mut.
§Safety
The range must be within bounds.
Provided Methods§
Sourcefn index_subslice_mut(&mut self, range: R) -> SubsliceMut<'_, Self>
fn index_subslice_mut(&mut self, range: R) -> SubsliceMut<'_, Self>
Sourcefn get_subslice_mut(&mut self, range: R) -> Option<SubsliceMut<'_, Self>>
fn get_subslice_mut(&mut self, range: R) -> Option<SubsliceMut<'_, Self>>
See slice::get.
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.