Function std::ptr::replace 1.0.0[−][src]
pub unsafe fn replace<T>(dest: *mut T, src: T) -> T
Moves src into the pointed dest, returning the previous dest value.
Neither value is dropped.
Safety
This is only unsafe because it accepts a raw pointer.
Otherwise, this operation is identical to mem::replace.