pub trait RestorationStore:
Send
+ Sync
+ 'static {
// Required methods
fn load(&self) -> Result<Option<Vec<u8>>, RestorationStoreError>;
fn save(&self, bytes: &[u8]) -> Result<(), RestorationStoreError>;
fn remove(&self) -> Result<(), RestorationStoreError>;
// Provided method
fn location(&self) -> Option<PathBuf> { ... }
}Expand description
Small persistence boundary for restoration snapshots. Implementations must
leave the previous valid snapshot untouched when save returns an error.
Required Methods§
fn load(&self) -> Result<Option<Vec<u8>>, RestorationStoreError>
fn save(&self, bytes: &[u8]) -> Result<(), RestorationStoreError>
fn remove(&self) -> Result<(), RestorationStoreError>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".