pub trait Persistable {
type Error;
// Required methods
fn sync(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn destroy(self) -> impl Future<Output = Result<(), Self::Error>> + Send;
// Provided method
fn commit(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send { ... }
}Expand description
A storage structure with capabilities to persist and recover state across restarts.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.