Struct slice_utils::SliceOfMut
source · pub struct SliceOfMut<T, A: SliceMut<T>> { /* private fields */ }
Expand description
A mutable sub-slice of a Slice
, from SliceMut::slice_mut
.
Implementations§
source§impl<T, A> SliceOfMut<T, A>where
A: SliceMut<T>,
impl<T, A> SliceOfMut<T, A>where
A: SliceMut<T>,
source§impl<T, A> SliceOfMut<T, A>where
A: SliceMut<T>,
impl<T, A> SliceOfMut<T, A>where
A: SliceMut<T>,
pub fn new<R: RangeBounds<usize>>(data: A, range: R) -> Option<Self>
Trait Implementations§
source§impl<T, A> Debug for SliceOfMut<T, A>
impl<T, A> Debug for SliceOfMut<T, A>
source§impl<T, A> IndexMut<usize> for SliceOfMut<T, A>
impl<T, A> IndexMut<usize> for SliceOfMut<T, A>
source§impl<'a, T, A> IntoIterator for &'a SliceOfMut<T, A>where
A: SliceMut<T>,
impl<'a, T, A> IntoIterator for &'a SliceOfMut<T, A>where
A: SliceMut<T>,
source§impl<'a, T, A> PartialEq<&'a [T]> for SliceOfMut<T, A>
impl<'a, T, A> PartialEq<&'a [T]> for SliceOfMut<T, A>
source§impl<T, A> PartialEq<[T]> for SliceOfMut<T, A>
impl<T, A> PartialEq<[T]> for SliceOfMut<T, A>
source§impl<T, A, const N: usize> PartialEq<[T; N]> for SliceOfMut<T, A>
impl<T, A, const N: usize> PartialEq<[T; N]> for SliceOfMut<T, A>
source§impl<T: PartialEq, A: PartialEq + SliceMut<T>> PartialEq for SliceOfMut<T, A>
impl<T: PartialEq, A: PartialEq + SliceMut<T>> PartialEq for SliceOfMut<T, A>
source§fn eq(&self, other: &SliceOfMut<T, A>) -> bool
fn eq(&self, other: &SliceOfMut<T, A>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T, A> Slice<T> for SliceOfMut<T, A>where
A: SliceMut<T>,
impl<T, A> Slice<T> for SliceOfMut<T, A>where
A: SliceMut<T>,
source§fn slice<R: RangeBounds<usize>>(self, range: R) -> Option<SliceOf<T, Self>>
fn slice<R: RangeBounds<usize>>(self, range: R) -> Option<SliceOf<T, Self>>
Takes a sub-slice, returning
None
if the range is out-of-bounds. Read moresource§fn chain<O: Slice<T>>(self, other: O) -> Chain<T, Self, O>
fn chain<O: Slice<T>>(self, other: O) -> Chain<T, Self, O>
Chains two slices together, back-to-back: the equivalent of
Iterator::chain
. Read moresource§fn cycle(self) -> Cycle<T, Self>
fn cycle(self) -> Cycle<T, Self>
Repeats the slice forever: the equivalent of
Iterator::cycle
. Read moresource§fn interleave<O: Slice<T>>(self, other: O) -> Interleave<T, Self, O>
fn interleave<O: Slice<T>>(self, other: O) -> Interleave<T, Self, O>
Interleaves two slices, e.g. [A, B, A, B, …]. Read more
source§fn reverse(self) -> Reverse<T, Self>
fn reverse(self) -> Reverse<T, Self>
Reverses the slice: the equivalent of
Iterator::rev
. Read moresource§impl<T, A> SliceMut<T> for SliceOfMut<T, A>where
A: SliceMut<T>,
impl<T, A> SliceMut<T> for SliceOfMut<T, A>where
A: SliceMut<T>,
source§fn slice_mut<R: RangeBounds<usize>>(
self,
range: R
) -> Option<SliceOfMut<T, Self>>
fn slice_mut<R: RangeBounds<usize>>( self, range: R ) -> Option<SliceOfMut<T, Self>>
Takes a mutable sub-slice, returning
None
if the range is out-of-bounds. Read moreimpl<T: Eq, A: Eq + SliceMut<T>> Eq for SliceOfMut<T, A>
impl<T, A: SliceMut<T>> StructuralPartialEq for SliceOfMut<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for SliceOfMut<T, A>where
A: Freeze,
impl<T, A> RefUnwindSafe for SliceOfMut<T, A>where
A: RefUnwindSafe,
impl<T, A> Send for SliceOfMut<T, A>where
A: Send,
impl<T, A> Sync for SliceOfMut<T, A>where
A: Sync,
impl<T, A> Unpin for SliceOfMut<T, A>where
A: Unpin,
impl<T, A> UnwindSafe for SliceOfMut<T, A>where
A: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more