- *mut T, 表明该可以通过该指针修改指向的数据。
- *const T,表明不可以通过该指针修改指向的数据。
Macros
Structs
NonNull
一个永不NULL的*mut T。dangling
创建一个实例,但是它可能是悬空。as_uninit_ref
night
as_uninit_mut
night
T:?sized
new_unchecked
pub const unsafe fn new_unchecked(ptr: *mut T) -> NonNull<T>
new
pub fn new(ptr: *mut T) -> Option<NonNull<T>>
as_ptr
pub const fn as_ptr(self) -> *mut T
as_ref
pub unsafe fn as_ref(&self) -> &T
as_mut
pub unsafe fn as_mut(&mut self) -> &mut T
cast
pub const fn cast<U>(self) -> NonNull<U>