Re-exported from core::ptr.
Raw pointer operations.
Re-exports
NonNull | Re-export of a builtin. |
load_volatile | Re-export of a builtin. |
store_volatile | Re-export of a builtin. |
Types
NonNull | Methods of the builtin type NonNull. |
Functions
null | The null *T. |
is_null | Whether p is null. |
offset | The address count elements of T past base: integer arithmetic on the address, since pointers have none of their own. |
Function declarations
fn nullsource
forall T.
fn null() -> *T { ... }
The null *T. Safe: it carries no authority, and reading or writing through it, as through any raw pointer, needs its own unsafe.
fn is_nullsource
forall T.
fn is_null(p: *T) -> bool { ... }
Whether p is null.
fn offsetsource
forall T.
unsafe fn offset(base: *T, count: usize) -> *T { ... }
The address count elements of T past base: integer arithmetic on the address, since pointers have none of their own. Caller: the result stays inside the block base points into; nothing checks it, and every use of the result relies on it.