StorageLoader

Trait StorageLoader 

Source
pub trait StorageLoader: Send + Sync {
    // Required method
    fn load(
        &self,
        storage_key: &str,
        tenant_id: u64,
    ) -> impl Future<Output = Option<CacheEntry>> + Send;
}
Expand description

Loads cached entries (typically from disk) given a storage key.

Required Methods§

Source

fn load( &self, storage_key: &str, tenant_id: u64, ) -> impl Future<Output = Option<CacheEntry>> + Send

Loads a cache entry for tenant_id, returning None on missing/mismatch.

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.

Implementors§

Source§

impl StorageLoader for MockStorageLoader

Available on crate features mock only.
Source§

impl StorageLoader for NvmeStorageLoader