Skip to main content

RepoStorage

Trait RepoStorage 

Source
pub trait RepoStorage:
    TufRepositoryStorage<Pouf1>
    + Send
    + Sync {
    // Required methods
    fn store_blob<'a>(
        &'a self,
        hash: &Hash,
        len: u64,
        path: &Utf8Path,
    ) -> BoxFuture<'a, Result<()>>;
    fn store_delivery_blob<'a>(
        &'a self,
        hash: &Hash,
        path: &Utf8Path,
        delivery_blob_type: DeliveryBlobType,
    ) -> BoxFuture<'a, Result<()>>;
}

Required Methods§

Source

fn store_blob<'a>( &'a self, hash: &Hash, len: u64, path: &Utf8Path, ) -> BoxFuture<'a, Result<()>>

Store a blob in this repository.

Source

fn store_delivery_blob<'a>( &'a self, hash: &Hash, path: &Utf8Path, delivery_blob_type: DeliveryBlobType, ) -> BoxFuture<'a, Result<()>>

Store a delivery blob in this repository.

Implementations on Foreign Types§

Source§

impl<T: RepoStorage + ?Sized> RepoStorage for &T

Source§

fn store_blob<'a>( &'a self, hash: &Hash, len: u64, path: &Utf8Path, ) -> BoxFuture<'a, Result<()>>

Source§

fn store_delivery_blob<'a>( &'a self, hash: &Hash, path: &Utf8Path, delivery_blob_type: DeliveryBlobType, ) -> BoxFuture<'a, Result<()>>

Source§

impl<T: RepoStorage + ?Sized> RepoStorage for &mut T

Source§

fn store_blob<'a>( &'a self, hash: &Hash, len: u64, path: &Utf8Path, ) -> BoxFuture<'a, Result<()>>

Source§

fn store_delivery_blob<'a>( &'a self, hash: &Hash, path: &Utf8Path, delivery_blob_type: DeliveryBlobType, ) -> BoxFuture<'a, Result<()>>

Source§

impl<T: RepoStorage + ?Sized> RepoStorage for Box<T>

Source§

fn store_blob<'a>( &'a self, hash: &Hash, len: u64, path: &Utf8Path, ) -> BoxFuture<'a, Result<()>>

Source§

fn store_delivery_blob<'a>( &'a self, hash: &Hash, path: &Utf8Path, delivery_blob_type: DeliveryBlobType, ) -> BoxFuture<'a, Result<()>>

Source§

impl<T: RepoStorage + ?Sized> RepoStorage for Arc<T>

Source§

fn store_blob<'a>( &'a self, hash: &Hash, len: u64, path: &Utf8Path, ) -> BoxFuture<'a, Result<()>>

Source§

fn store_delivery_blob<'a>( &'a self, hash: &Hash, path: &Utf8Path, delivery_blob_type: DeliveryBlobType, ) -> BoxFuture<'a, Result<()>>

Implementors§