Trait moveit::MoveNew[][src]

pub unsafe trait MoveNew: Sized {
    unsafe fn move_new(
        src: Pin<MoveRef<'_, Self>>,
        this: Pin<&mut MaybeUninit<Self>>
    ); }
Expand description

A move constructible type: a destination-aware Clone that destroys the moved-from value.

Safety

After MoveNew::move_new() is called:

  • src should be treated as having been destroyed.
  • this must have been initialized.

Required methods

Move-construct src into this, effectively re-pinning it at a new location.

Safety

The same safety requirements of New::new() apply, but, in addition, *src must not be used after this function is called, because it has effectively been destroyed.

Implementors