Skip to main content

PinnedDrop

Trait PinnedDrop 

Source
pub trait PinnedDrop {
    // Required method
    fn drop(self: Pin<&mut Self>);
}
Expand description

This trait needs to be implemented if you use the #[pin_drop] attribute. It enables you to implement Drop for your type safely.

Required Methods§

Source

fn drop(self: Pin<&mut Self>)

This is the equivalent to the regular Drop trait with the difference that self is pinned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§