pub struct PmRepository { /* private fields */ }Expand description
Serve a repository from a local pm repository.
Implementations§
Source§impl PmRepository
impl PmRepository
pub fn builder(pm_repo_path: Utf8PathBuf) -> PmRepositoryBuilder
Sourcepub fn new(pm_repo_path: Utf8PathBuf) -> Self
pub fn new(pm_repo_path: Utf8PathBuf) -> Self
Construct a PmRepository.
Sourcepub fn repo_keys(&self) -> Result<RepoKeys, ParseError>
pub fn repo_keys(&self) -> Result<RepoKeys, ParseError>
Tries to return the pm repository [RepoKeys]. Returns an empty [RepoKeys] if the keys/
directory does not exist in the repository.
Trait Implementations§
Source§impl Debug for PmRepository
impl Debug for PmRepository
Source§impl RepoProvider for PmRepository
impl RepoProvider for PmRepository
Source§fn fetch_metadata_range<'a>(
&'a self,
resource_path: &str,
range: Range,
) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_metadata_range<'a>( &'a self, resource_path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Fetch a metadata Resource from this repository.
Source§fn fetch_blob_range<'a>(
&'a self,
resource_path: &str,
range: Range,
) -> BoxFuture<'a, Result<Resource, Error>>
fn fetch_blob_range<'a>( &'a self, resource_path: &str, range: Range, ) -> BoxFuture<'a, Result<Resource, Error>>
Fetch a blob Resource from this repository.
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.
Source§impl RepoStorage for PmRepository
impl RepoStorage for PmRepository
Source§fn store_blob<'a>(
&'a self,
hash: &Hash,
len: u64,
path: &Utf8Path,
) -> BoxFuture<'a, Result<()>>
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<()>>
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.
Source§impl RepositoryProvider<Pouf1> for PmRepository
impl RepositoryProvider<Pouf1> for PmRepository
Source§fn fetch_metadata<'a>(
&'a self,
meta_path: &MetadataPath,
version: MetadataVersion,
) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
fn fetch_metadata<'a>( &'a self, meta_path: &MetadataPath, version: MetadataVersion, ) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
Source§fn fetch_target<'a>(
&'a self,
target_path: &TargetPath,
) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
fn fetch_target<'a>( &'a self, target_path: &TargetPath, ) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
Fetch the given target. Read more
Source§impl RepositoryStorage<Pouf1> for PmRepository
impl RepositoryStorage<Pouf1> for PmRepository
Source§fn store_metadata<'a>(
&'a self,
meta_path: &MetadataPath,
version: MetadataVersion,
metadata: &'a mut (dyn AsyncRead + Send + Unpin + 'a),
) -> BoxFuture<'a, Result<()>>
fn store_metadata<'a>( &'a self, meta_path: &MetadataPath, version: MetadataVersion, metadata: &'a mut (dyn AsyncRead + Send + Unpin + 'a), ) -> 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.Source§fn store_target<'a>(
&'a self,
target_path: &TargetPath,
target: &'a mut (dyn AsyncRead + Send + Unpin + 'a),
) -> BoxFuture<'a, Result<()>>
fn store_target<'a>( &'a self, target_path: &TargetPath, target: &'a mut (dyn AsyncRead + Send + Unpin + 'a), ) -> BoxFuture<'a, Result<()>>
Store the provided
target in a location identified by target_path, overwriting any
existing target at that location.Auto Trait Implementations§
impl !Freeze for PmRepository
impl RefUnwindSafe for PmRepository
impl Send for PmRepository
impl Sync for PmRepository
impl Unpin for PmRepository
impl UnsafeUnpin for PmRepository
impl UnwindSafe for PmRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more