#[repr(C)]pub struct NonNullSlice<T> { /* private fields */ }Implementations§
Source§impl<T> NonNullSlice<T>
impl<T> NonNullSlice<T>
pub const unsafe fn from_raw_parts( ptr: NonNull<T>, len: usize, ) -> NonNullSlice<T>
pub const fn as_non_null(&self) -> NonNull<T>
pub const fn as_ptr(&self) -> *mut T
pub const fn len(&self) -> usize
Sourcepub unsafe fn into_slice_mut<'a>(self) -> &'a mut [T]
pub unsafe fn into_slice_mut<'a>(self) -> &'a mut [T]
Converts a NonNullSlice<T> into a slice of type T
§Safety
panics if the slice ptr is not aligned to the alignment of T
Trait Implementations§
Source§impl<T> Clone for NonNullSlice<T>where
T: Clone,
impl<T> Clone for NonNullSlice<T>where
T: Clone,
Source§fn clone(&self) -> NonNullSlice<T>
fn clone(&self) -> NonNullSlice<T>
Returns a copy 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 for NonNullSlice<T>where
T: Debug,
impl<T> Debug for NonNullSlice<T>where
T: Debug,
impl<T> Copy for NonNullSlice<T>where
T: Copy,
Auto Trait Implementations§
impl<T> Freeze for NonNullSlice<T>
impl<T> RefUnwindSafe for NonNullSlice<T>where
T: RefUnwindSafe,
impl<T> !Send for NonNullSlice<T>
impl<T> !Sync for NonNullSlice<T>
impl<T> Unpin for NonNullSlice<T>
impl<T> UnwindSafe for NonNullSlice<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