Skip to main content

BlobStoreExt

Trait BlobStoreExt 

Source
pub trait BlobStoreExt: BlobStore {
    // Provided methods
    fn fetch_blob_simple<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 BlobToken,
    ) -> Pin<Box<dyn Future<Output = Result<BlobHandle, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn ensure_local<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 BlobToken,
    ) -> Pin<Box<dyn Future<Output = Result<PathBuf, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn storage_summary(&self) -> BlobStorageSummary { ... }
}
Expand description

Extension methods for BlobStore

Provides convenience methods built on top of the core BlobStore trait.

Provided Methods§

Source

fn fetch_blob_simple<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 BlobToken, ) -> Pin<Box<dyn Future<Output = Result<BlobHandle, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Sync + 'async_trait,

Fetch blob without progress callback

Convenience method when progress tracking isn’t needed.

Source

fn ensure_local<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 BlobToken, ) -> Pin<Box<dyn Future<Output = Result<PathBuf, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Sync + 'async_trait,

Ensure blob is available locally, fetching if needed

Returns the local path if already present, otherwise fetches.

Source

fn storage_summary(&self) -> BlobStorageSummary

Get storage usage summary

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<T> BlobStoreExt for T
where T: BlobStore + ?Sized,