pub trait RepoProvider:
TufRepositoryProvider<Pouf1>
+ Debug
+ Send
+ Sync {
// Required methods
fn aliases(&self) -> &BTreeSet<String>;
fn fetch_metadata_range<'a>(
&'a self,
path: &str,
range: Range,
) -> BoxFuture<'a, Result<Resource, Error>>;
fn fetch_blob_range<'a>(
&'a self,
path: &str,
range: Range,
) -> BoxFuture<'a, Result<Resource, Error>>;
fn blob_modification_time<'a>(
&'a self,
path: &str,
) -> BoxFuture<'a, Result<Option<SystemTime>>>;
// Provided methods
fn supports_watch(&self) -> bool { ... }
fn watch(&self) -> Result<BoxStream<'static, ()>> { ... }
fn blob_type(&self) -> DeliveryBlobType { ... }
}Required Methods§
Sourcefn fetch_metadata_range<'a>(
&'a self,
path: &str,
range: Range,
) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_metadata_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Fetch a metadata Resource from this repository.
Sourcefn fetch_blob_range<'a>(
&'a self,
path: &str,
range: Range,
) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_blob_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Fetch a blob Resource from this repository.
Sourcefn blob_modification_time<'a>(
&'a self,
path: &str,
) -> BoxFuture<'a, Result<Option<SystemTime>>>
fn blob_modification_time<'a>( &'a self, path: &str, ) -> BoxFuture<'a, Result<Option<SystemTime>>>
Get the modification time of a blob in this repository if available.
Provided Methods§
Sourcefn supports_watch(&self) -> bool
fn supports_watch(&self) -> bool
Whether or not the backend supports watching for file changes.
Sourcefn watch(&self) -> Result<BoxStream<'static, ()>>
fn watch(&self) -> Result<BoxStream<'static, ()>>
Returns a stream which sends a unit value every time the given path is modified.
Sourcefn blob_type(&self) -> DeliveryBlobType
fn blob_type(&self) -> DeliveryBlobType
Get the type of delivery blobs in this repository.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: RepoProvider + ?Sized> RepoProvider for &T
impl<T: RepoProvider + ?Sized> RepoProvider for &T
Source§fn supports_watch(&self) -> bool
fn supports_watch(&self) -> bool
Whether or not the backend supports watching for file changes.
Source§fn watch(&self) -> Result<BoxStream<'static, ()>>
fn watch(&self) -> Result<BoxStream<'static, ()>>
Returns a stream which sends a unit value every time the given path is modified.
Source§fn blob_modification_time<'a>(
&'a self,
path: &str,
) -> BoxFuture<'a, Result<Option<SystemTime>>>
fn blob_modification_time<'a>( &'a self, path: &str, ) -> BoxFuture<'a, Result<Option<SystemTime>>>
Get the modification time of a blob in this repository if available.
Source§fn blob_type(&self) -> DeliveryBlobType
fn blob_type(&self) -> DeliveryBlobType
Get the type of delivery blobs in this repository.
fn aliases(&self) -> &BTreeSet<String>
fn fetch_metadata_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_blob_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Source§impl<T: RepoProvider + ?Sized> RepoProvider for &mut T
impl<T: RepoProvider + ?Sized> RepoProvider for &mut T
Source§fn supports_watch(&self) -> bool
fn supports_watch(&self) -> bool
Whether or not the backend supports watching for file changes.
Source§fn watch(&self) -> Result<BoxStream<'static, ()>>
fn watch(&self) -> Result<BoxStream<'static, ()>>
Returns a stream which sends a unit value every time the given path is modified.
Source§fn blob_modification_time<'a>(
&'a self,
path: &str,
) -> BoxFuture<'a, Result<Option<SystemTime>>>
fn blob_modification_time<'a>( &'a self, path: &str, ) -> BoxFuture<'a, Result<Option<SystemTime>>>
Get the modification time of a blob in this repository if available.
Source§fn blob_type(&self) -> DeliveryBlobType
fn blob_type(&self) -> DeliveryBlobType
Get the type of delivery blobs in this repository.
fn aliases(&self) -> &BTreeSet<String>
fn fetch_metadata_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_blob_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Source§impl<T: RepoProvider + ?Sized> RepoProvider for Arc<T>
impl<T: RepoProvider + ?Sized> RepoProvider for Arc<T>
Source§fn supports_watch(&self) -> bool
fn supports_watch(&self) -> bool
Whether or not the backend supports watching for file changes.
Source§fn watch(&self) -> Result<BoxStream<'static, ()>>
fn watch(&self) -> Result<BoxStream<'static, ()>>
Returns a stream which sends a unit value every time the given path is modified.
Source§fn blob_modification_time<'a>(
&'a self,
path: &str,
) -> BoxFuture<'a, Result<Option<SystemTime>>>
fn blob_modification_time<'a>( &'a self, path: &str, ) -> BoxFuture<'a, Result<Option<SystemTime>>>
Get the modification time of a blob in this repository if available.
Source§fn blob_type(&self) -> DeliveryBlobType
fn blob_type(&self) -> DeliveryBlobType
Get the type of delivery blobs in this repository.
fn aliases(&self) -> &BTreeSet<String>
fn fetch_metadata_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_blob_range<'a>( &'a self, path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Source§impl<T: RepoProvider + ?Sized> RepoProvider for Box<T>
impl<T: RepoProvider + ?Sized> RepoProvider for Box<T>
Source§fn supports_watch(&self) -> bool
fn supports_watch(&self) -> bool
Whether or not the backend supports watching for file changes.
Source§fn watch(&self) -> Result<BoxStream<'static, ()>>
fn watch(&self) -> Result<BoxStream<'static, ()>>
Returns a stream which sends a unit value every time the given path is modified.
Source§fn blob_modification_time<'a>(
&'a self,
path: &str,
) -> BoxFuture<'a, Result<Option<SystemTime>>>
fn blob_modification_time<'a>( &'a self, path: &str, ) -> BoxFuture<'a, Result<Option<SystemTime>>>
Get the modification time of a blob in this repository if available.
Source§fn blob_type(&self) -> DeliveryBlobType
fn blob_type(&self) -> DeliveryBlobType
Get the type of delivery blobs in this repository.