Skip to main content

Cleanup

Trait Cleanup 

Source
pub trait Cleanup<P>: Sized {
    type Error;

    // Required methods
    fn primary(&self) -> P;
    fn failure(&self) -> Self::Error;
    fn try_close(self, report: impl FnMut(Self::Error)) -> Result<P, Self>;
}
Expand description

Retained storage cleanup preserves its primary error across every retry.

Required Associated Types§

Required Methods§

Source

fn primary(&self) -> P

Source

fn failure(&self) -> Self::Error

Source

fn try_close(self, report: impl FnMut(Self::Error)) -> Result<P, Self>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<P> Cleanup<P> for Infallible

Source§

type Error = P

Source§

fn primary(&self) -> P

Source§

fn failure(&self) -> P

Source§

fn try_close(self, _: impl FnMut(Self::Error)) -> Result<P, Self>

Implementors§