Function std::ptr::replace
[−]
[src]
pub unsafe fn replace<T>(dest: *mut T, src: T) -> T
Replaces the value at dest
`destwith
` with src
`src`, returning the old
value, without dropping either.
Safety
This is only unsafe because it accepts a raw pointer.
Otherwise, this operation is identical to mem::replace
`mem::replace`.