[src]

Module std::ptr

Unsafe pointer utility functions

RawPtr

Extension methods for raw pointers.

array_each

Given a null-pointer-terminated **T (pointer to an array of pointers), iterate through each *T, passing to the provided callback function

array_each_with_len

Given a **T (pointer to an array of pointers), iterate through each *T, up to the provided len, passing to the provided callback function

buf_len

Return the offset of the first null pointer in buf.

copy_memory

Copies data from one location to another.

copy_nonoverlapping_memory

Copies data from one location to another.

mut_null

Create an unsafe mutable null pointer

null

Create an unsafe null pointer

position

Return the first offset i such that f(buf[i]) == true.

read

Reads the value from *src and returns it.

read_and_zero

Reads the value from *src and nulls it out. This currently prevents destructors from executing.

replace

Replace the value at a mutable location with a new one, returning the old value, without deinitialising either.

set_memory

Invokes memset on the specified pointer, setting count * size_of::<T>() bytes of memory starting at dst to c.

swap

Swap the values at two mutable locations of the same type, without deinitialising either. They may overlap.

zero_memory

Zeroes out count * size_of::<T> bytes of memory at dst