pub unsafe trait CopyNew: Sized {
// Required method
unsafe fn copy_new(src: &Self, this: Pin<&mut MaybeUninit<Self>>);
}Expand description
A copy constructible type: a destination-aware Clone.
§Safety
After CopyNew::copy_new() is called:
thismust have been initialized.
Required Methods§
sourceunsafe fn copy_new(src: &Self, this: Pin<&mut MaybeUninit<Self>>)
unsafe fn copy_new(src: &Self, this: Pin<&mut MaybeUninit<Self>>)
Copy-construct src into this, effectively re-pinning it at a new
location.
§Safety
The same safety requirements of New::new() apply.
Object Safety§
This trait is not object safe.