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§
fn primary(&self) -> P
fn failure(&self) -> Self::Error
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".