Skip to main content

StorageProvider

Trait StorageProvider 

Source
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§

Source

fn status(&self) -> StorageStatus

Returns coarse provider availability.

Source

fn health(&self) -> StorageHealth

Returns a current provider health snapshot.

Source

fn open(&mut self) -> StorageResult<()>

Opens and validates provider resources.

Source

fn close(&mut self) -> StorageResult<()>

Closes provider resources.

Source

fn begin_transaction(&mut self) -> StorageResult<Box<dyn Transaction>>

Begins a real unit of work or fails explicitly when unsupported.

Source

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".

Implementors§