pub unsafe trait Transfer<T> {
// Required methods
fn len(&self) -> usize;
unsafe fn transfer(self, len: usize, dst: *mut T);
}Expand description
Types that may be passed to append.
This trait is implemented on collections that coerce into a slice ([T] or &[T] where T: Copy), which notably don’t include most iterator adapters. This is because
append requires all transfer operations to not diverge (e.g.
panic!(..)), otherwise the fragment slice may end up with uninitialized memory which
will lead to undefined behavior when used or even dropped.