pub trait RepositoryStorage<D>where
D: Pouf,{
// Required methods
fn store_metadata<'a>(
&'a self,
meta_path: &MetadataPath,
version: MetadataVersion,
metadata: &'a mut (dyn AsyncRead + Send + Unpin),
) -> BoxFuture<'a, Result<()>>;
fn store_target<'a>(
&'a self,
target_path: &TargetPath,
target: &'a mut (dyn AsyncRead + Send + Unpin),
) -> BoxFuture<'a, Result<()>>;
}Expand description
A writable TUF repository. Most implementors of this trait should also implement
RepositoryProvider.
Required Methods§
Sourcefn store_metadata<'a>(
&'a self,
meta_path: &MetadataPath,
version: MetadataVersion,
metadata: &'a mut (dyn AsyncRead + Send + Unpin),
) -> BoxFuture<'a, Result<()>>
fn store_metadata<'a>( &'a self, meta_path: &MetadataPath, version: MetadataVersion, metadata: &'a mut (dyn AsyncRead + Send + Unpin), ) -> BoxFuture<'a, Result<()>>
Store the provided metadata in a location identified by meta_path, version, and
D::extension(), overwriting any existing metadata at that location.
Sourcefn store_target<'a>(
&'a self,
target_path: &TargetPath,
target: &'a mut (dyn AsyncRead + Send + Unpin),
) -> BoxFuture<'a, Result<()>>
fn store_target<'a>( &'a self, target_path: &TargetPath, target: &'a mut (dyn AsyncRead + Send + Unpin), ) -> BoxFuture<'a, Result<()>>
Store the provided target in a location identified by target_path, overwriting any
existing target at that location.