Skip to main content

IntoCleanup

Trait IntoCleanup 

Source
pub trait IntoCleanup {
    // Required method
    fn into_cleanup(self) -> Option<Box<dyn FnOnce()>>;
}
Expand description

What an effect may hand back: nothing, or the work that undoes it.

Required Methods§

Source

fn into_cleanup(self) -> Option<Box<dyn FnOnce()>>

The cleanup, if there is one.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl IntoCleanup for ()

Implementors§

Source§

impl<F: FnOnce() + 'static> IntoCleanup for F