Function std::ptr::read_and_zero [] [src]

pub unsafe fn read_and_zero<T>(dest: *mut T) -> T
Deprecated since 1.3.0

: a "zero value" will soon not actually exist for all types once dynamic drop has been implemented

Reads the value from src`src` and nulls it out without dropping it.

Safety

This is unsafe for the same reasons that read`read` is unsafe.