[−][src]Trait moveslice::Moveslice
A trait declaring the moveslice
and try_moveslice
functions.
Used to implement the functions on all slices.
Associated Types
type Target
Specifies the type of the destination index.
type Err
Specifies the errors being returned.
Required methods
fn moveslice(&mut self, bounds: R, destination: Self::Target) where
R: RangeBounds<usize>,
R: RangeBounds<usize>,
Moves a slice within an array/slice around.
bounds
- specifies the range of where the subslice is. Examples: 3..5, 5..=8destination
- specifies where the subslice should be moved to.
fn try_moveslice(
&mut self,
bounds: R,
destination: Self::Target
) -> Result<(), Self::Err> where
R: RangeBounds<usize>,
&mut self,
bounds: R,
destination: Self::Target
) -> Result<(), Self::Err> where
R: RangeBounds<usize>,
Similar to moveslice
, except it does not panic, returning a Result
instead.
Implementors
impl<T: 'static, R, A> Moveslice<T, R> for A where
A: AsMut<[T]>,
[src]
A: AsMut<[T]>,
Implements the moveslice functions on all slices.
type Target = usize
type Err = Error
fn moveslice(&mut self, bounds: R, destination: Self::Target) where
R: RangeBounds<usize>,
[src]
R: RangeBounds<usize>,
fn try_moveslice(
&mut self,
bounds: R,
destination: Self::Target
) -> Result<(), Self::Err> where
R: RangeBounds<usize>,
[src]
&mut self,
bounds: R,
destination: Self::Target
) -> Result<(), Self::Err> where
R: RangeBounds<usize>,