StorageBackend

Trait StorageBackend 

Source
pub trait StorageBackend: ObjectStoreBackend {
    // Required method
    fn open(path: &Path) -> Result<Self>
       where Self: Sized;

    // Provided methods
    fn close(&self) -> Result<()> { ... }
    fn stats(&self) -> StorageStats { ... }
}
Expand description

High-level storage backend trait with lifecycle management.

Required Methods§

Source

fn open(path: &Path) -> Result<Self>
where Self: Sized,

Opens or creates the storage at the given path.

Provided Methods§

Source

fn close(&self) -> Result<()>

Closes the storage, flushing any pending data.

Source

fn stats(&self) -> StorageStats

Returns storage statistics.

Implementors§