pub struct RingBufSliceMut<'a, T> { /* private fields */ }
Expand description
a mutable element range of a RingBuf
Implementations§
Source§impl<'a, T> RingBufSliceMut<'a, T>
impl<'a, T> RingBufSliceMut<'a, T>
Sourcepub fn as_mut_slices(&mut self) -> (&'a mut [T], Option<&'a mut [T]>)
pub fn as_mut_slices(&mut self) -> (&'a mut [T], Option<&'a mut [T]>)
get mutable slices representing range
Sourcepub fn range(&self, range: Range<usize>) -> RingBufSlice<'a, T>
pub fn range(&self, range: Range<usize>) -> RingBufSlice<'a, T>
get sub-range into range
Sourcepub fn range_mut(&mut self, range: Range<usize>) -> RingBufSliceMut<'a, T>
pub fn range_mut(&mut self, range: Range<usize>) -> RingBufSliceMut<'a, T>
get mutable sub-range into range
Sourcepub fn split_at_mut(
self,
index: usize,
) -> (RingBufSliceMut<'a, T>, RingBufSliceMut<'a, T>)
pub fn split_at_mut( self, index: usize, ) -> (RingBufSliceMut<'a, T>, RingBufSliceMut<'a, T>)
split into two mutable slices at index
Source§impl<'a, T: Copy> RingBufSliceMut<'a, T>
impl<'a, T: Copy> RingBufSliceMut<'a, T>
Sourcepub fn copy_to_slice(&self, slice: &mut [T])
pub fn copy_to_slice(&self, slice: &mut [T])
copy contents of range to a slice
Sourcepub unsafe fn copy_to_ptr(&self, dest: *mut T, count: usize)
pub unsafe fn copy_to_ptr(&self, dest: *mut T, count: usize)
copy contents of range to a raw pointer
Sourcepub fn read_fixed<const N: usize>(&self) -> [T; N]
pub fn read_fixed<const N: usize>(&self) -> [T; N]
read elements as fixed length array
Sourcepub fn copy_from_slice(&mut self, slice: &[T])
pub fn copy_from_slice(&mut self, slice: &[T])
copy contents of a slice to the range
Sourcepub unsafe fn copy_from_ptr(&mut self, dest: *const T, count: usize)
pub unsafe fn copy_from_ptr(&mut self, dest: *const T, count: usize)
copy contents of a raw pointer to the range
Auto Trait Implementations§
impl<'a, T> Freeze for RingBufSliceMut<'a, T>
impl<'a, T> RefUnwindSafe for RingBufSliceMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for RingBufSliceMut<'a, T>
impl<'a, T> !Sync for RingBufSliceMut<'a, T>
impl<'a, T> Unpin for RingBufSliceMut<'a, T>
impl<'a, T> UnwindSafe for RingBufSliceMut<'a, T>where
T: RefUnwindSafe,
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