Trait possibly_uninit::cast::SlicePointerMut [−][src]
Trait for unique smart pointers/references containing slices, allowing casting between them.
Associated Types
Loading content...Required methods
fn into_raw_parts_mut(self) -> (*mut Self::Item, usize)
[src]
Returns pointer and length of the slice, forgetting the original value.
unsafe fn from_raw_parts_mut(ptr: *mut Self::Item, len: usize) -> Self
[src]
Converts a raw pointer and length returned from into_raw_mut
into
smart pointer.
Safety
These operations must be sound (pseudo code ignoring len):
- `P
::from_raw_parts_mut(P ::into_raw_parts_mut(x)) - `P
::from_raw_parts_mut(P<MaybeUninit >::into_raw_parts_mut(x) as *mut T)
Where P
is the pointer type corresponding to Self
and x
is a
valid value for given smart pointer.