Skip to main content

IntoCleanup

Trait IntoCleanup 

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

What an effect body may return.

The Marker type parameter exists only to keep the () and FnOnce() + 'static impls from overlapping; it is always inferred.

Required Methods§

Source

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

Convert into a stored cleanup, if any.

Implementations on Foreign Types§

Source§

impl IntoCleanup<NoCleanup> for ()

Implementors§

Source§

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