Trait Transfer

Source
pub unsafe trait Transfer {
    // Required methods
    unsafe fn transfer(src: &mut PinStack<'_, Self>, dst: *mut Self)
       where Self: Sized;
    fn empty() -> Tr<Self>;
}
Expand description

§Safety

  • Implementers must write a valid Self to the dst argument of transfer
  • Implementers are not allowed to panic in the transfer function
  • Implementers must reset pin to a value that can be safely dropped without incidence on the dst pointer that was written to in the transfer function

Required Methods§

Source

unsafe fn transfer(src: &mut PinStack<'_, Self>, dst: *mut Self)
where Self: Sized,

§Safety
  • Callers of this function must call reset on the src argument right afterwards.
  • dst must point to a Self instance, that can possibly be uninitialized
  • src and dest must point to different instances.
Source

fn empty() -> Tr<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§