pub trait AsyncDrop {
type Dropper: Future<Output = ()> + Send + 'static;
// Required method
fn async_drop(self) -> Self::Dropper;
}Expand description
Trait for types that require async cleanup.
Implement this trait for your type to define how it should be cleaned up asynchronously.
Required Associated Types§
Required Methods§
Sourcefn async_drop(self) -> Self::Dropper
fn async_drop(self) -> Self::Dropper
Perform the async cleanup. This method consumes the object.