[−][src]Trait unsafer::pointers::Pointer
Required methods
pub fn as_mut_ptr(&mut self) -> *mut T
[src]
Casts a generic pointer into a mutable pointer.
pub fn as_ptr(&self) -> *const T
[src]
Casts a generic pointer into a const pointer.
Provided methods
pub unsafe fn write_with(&mut self, f: impl FnOnce() -> T)
[src]
Runs f
and writes the result into the location.
Safety
Every invariant of write applies to this. Memory behind the pointer must be treated as undefined if
f
panics.