[−][src]Trait clone_into_box::CloneIntoBox
A (possibly unsized) value which can be cloned into a pre-allocated space.
Users can use CloneIntoBoxExt
to clone it into Box<T>
.
Required methods
unsafe fn clone_into_ptr(&self, ptr: *mut u8)
Clone into the specified place.
Effect
After successful invocation, the area pointed to
by ptr
will contain a valid representation of Self
with auxiliary data contained in the self
fat pointer.
Safety
The ptr
parameter must point to an uninitialized area
which has enough space of std::mem::size_of_val(self)
bytes
and is aligned to std::mem::align_of_val(self)
bytes.
Panics
This method isn't expected to panic in normal cases, but the caller must handle panics carefully for safety.