pub trait StorageProvider {
// Required methods
fn status(&self) -> StorageStatus;
fn health(&self) -> StorageHealth;
fn open(&mut self) -> StorageResult<()>;
fn close(&mut self) -> StorageResult<()>;
fn begin_transaction(&mut self) -> StorageResult<Box<dyn Transaction>>;
fn list_backups(&self) -> Vec<BackupDescriptor>;
}Expand description
Storage provider contract.
Required Methods§
Sourcefn status(&self) -> StorageStatus
fn status(&self) -> StorageStatus
Returns coarse provider availability.
Sourcefn health(&self) -> StorageHealth
fn health(&self) -> StorageHealth
Returns a current provider health snapshot.
Sourcefn open(&mut self) -> StorageResult<()>
fn open(&mut self) -> StorageResult<()>
Opens and validates provider resources.
Sourcefn close(&mut self) -> StorageResult<()>
fn close(&mut self) -> StorageResult<()>
Closes provider resources.
Sourcefn begin_transaction(&mut self) -> StorageResult<Box<dyn Transaction>>
fn begin_transaction(&mut self) -> StorageResult<Box<dyn Transaction>>
Begins a real unit of work or fails explicitly when unsupported.
Sourcefn list_backups(&self) -> Vec<BackupDescriptor>
fn list_backups(&self) -> Vec<BackupDescriptor>
Lists provider-owned backups.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".