pub struct RawSliceMut<T> { /* private fields */ }Implementations§
Source§impl<T> RawSliceMut<T>
impl<T> RawSliceMut<T>
Sourcepub const unsafe fn new(data: &mut [T]) -> Self
pub const unsafe fn new(data: &mut [T]) -> Self
Creates a new RawSlice<T> from a slice reference.
§Safety
- The caller must ensure that the slice outlives this
RawSlice<T>. - The original slice must not be mutated while this
RawSlice<T>is used.
Sourcepub const fn new_nulled() -> Self
pub const fn new_nulled() -> Self
Creates an empty RawSlice<T>, equivalent to a null pointer with zero length.
Sourcepub const unsafe fn set(&mut self, data: &mut [T])
pub const unsafe fn set(&mut self, data: &mut [T])
Updates the raw pointer and length to point to a new slice.
§Safety
- The caller must ensure that the slice outlives this
RawSlice<T>. - The original slice must not be mutated while this
RawSlice<T>is used.
pub const fn set_null(&mut self)
pub const fn is_null(&self) -> bool
Trait Implementations§
Source§impl<T: Clone> Clone for RawSliceMut<T>
impl<T: Clone> Clone for RawSliceMut<T>
Source§fn clone(&self) -> RawSliceMut<T>
fn clone(&self) -> RawSliceMut<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for RawSliceMut<T>
impl<T: Debug> Debug for RawSliceMut<T>
Source§impl<T> Default for RawSliceMut<T>
impl<T> Default for RawSliceMut<T>
impl<T: Copy> Copy for RawSliceMut<T>
impl<T: Send> Send for RawSliceMut<T>
Safety: This type MUST be used with mutex to ensure concurrent access is valid.
Auto Trait Implementations§
impl<T> Freeze for RawSliceMut<T>
impl<T> RefUnwindSafe for RawSliceMut<T>where
T: RefUnwindSafe,
impl<T> !Sync for RawSliceMut<T>
impl<T> Unpin for RawSliceMut<T>
impl<T> UnwindSafe for RawSliceMut<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