Skip to main content

BlobStore

Trait BlobStore 

Source
pub trait BlobStore: Send + Sync {
    // Required methods
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        digest: &'life1 B3Digest,
    ) -> Pin<Box<dyn Future<Output = Result<Option<BlobMeta>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn has<'life0, 'life1, 'async_trait>(
        &'life0 self,
        digest: &'life1 B3Digest,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn put<'life0, 'life1, 'async_trait>(
        &'life0 self,
        digest: &'life1 B3Digest,
        blob_meta: BlobMeta,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Retrieves and stores BlobMeta about Blobs. Blobs can consist of multiple Chunks. Blobs are keyed by the BLAKE3 digest of their entire data.

Required Methods§

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<Option<BlobMeta>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves a BlobMeta for a given blob digest.

Source

fn has<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Checks if a BlobMeta for a given blob exists.

Source

fn put<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, blob_meta: BlobMeta, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persists a BlobMeta for the given blob digest.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + BlobStore + ?Sized> BlobStore for &'a T
where &'a T: Send + Sync,

Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<Option<BlobMeta>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn has<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn put<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, blob_meta: BlobMeta, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<'a, T: 'a + BlobStore + ?Sized> BlobStore for &'a mut T
where &'a mut T: Send + Sync,

Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<Option<BlobMeta>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn has<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn put<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, blob_meta: BlobMeta, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<T: BlobStore + ?Sized> BlobStore for Box<T>
where Box<T>: Send + Sync,

Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<Option<BlobMeta>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn has<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn put<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, blob_meta: BlobMeta, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl<T: BlobStore + ?Sized> BlobStore for Arc<T>
where Arc<T>: Send + Sync,

Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<Option<BlobMeta>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn has<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn put<'life0, 'life1, 'async_trait>( &'life0 self, digest: &'life1 B3Digest, blob_meta: BlobMeta, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl BlobStore for MemoryBlobStore

Source§

impl BlobStore for ObjectStoreBlobStore

Source§

impl<BN, BF> BlobStore for Cache<BN, BF>
where BN: BlobStore, BF: BlobStore,

Source§

impl<BS> BlobStore for Priority<BS>
where BS: BlobStore,

Source§

impl<BS> BlobStore for Race<BS>
where BS: BlobStore,

Source§

impl<T> BlobStore for GrpcBlobStore<T>
where T: GrpcService<Body> + Send + Sync + Clone + 'static, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send, T::Future: Send,