pub struct FileSystemRepository { /* private fields */ }Expand description
Serve a repository from the file system.
Implementations§
Source§impl FileSystemRepository
impl FileSystemRepository
Sourcepub fn builder(
metadata_repo_path: Utf8PathBuf,
blob_repo_path: Utf8PathBuf,
) -> FileSystemRepositoryBuilder
pub fn builder( metadata_repo_path: Utf8PathBuf, blob_repo_path: Utf8PathBuf, ) -> FileSystemRepositoryBuilder
Construct a FileSystemRepositoryBuilder.
Sourcepub fn new(metadata_repo_path: Utf8PathBuf, blob_repo_path: Utf8PathBuf) -> Self
pub fn new(metadata_repo_path: Utf8PathBuf, blob_repo_path: Utf8PathBuf) -> Self
Construct a FileSystemRepository.
pub fn blob_repo_path(&self) -> &Utf8PathBuf
Trait Implementations§
Source§impl Debug for FileSystemRepository
impl Debug for FileSystemRepository
Source§impl RepoProvider for FileSystemRepository
impl RepoProvider for FileSystemRepository
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 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§fn supports_watch(&self) -> bool
fn supports_watch(&self) -> bool
Whether or not the backend supports watching for file changes.
Source§impl RepoStorage for FileSystemRepository
impl RepoStorage for FileSystemRepository
Source§fn store_blob<'a>(
&'a self,
hash: &Hash,
len: u64,
src: &Utf8Path,
) -> BoxFuture<'a, Result<()>>
fn store_blob<'a>( &'a self, hash: &Hash, len: u64, src: &Utf8Path, ) -> BoxFuture<'a, Result<()>>
Store a blob in this repository.
Source§fn store_delivery_blob<'a>(
&'a self,
hash: &Hash,
src: &Utf8Path,
delivery_blob_type: DeliveryBlobType,
) -> BoxFuture<'a, Result<()>>
fn store_delivery_blob<'a>( &'a self, hash: &Hash, src: &Utf8Path, delivery_blob_type: DeliveryBlobType, ) -> BoxFuture<'a, Result<()>>
Store a delivery blob in this repository.
Source§impl RepositoryProvider<Pouf1> for FileSystemRepository
impl RepositoryProvider<Pouf1> for FileSystemRepository
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 FileSystemRepository
impl RepositoryStorage<Pouf1> for FileSystemRepository
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 FileSystemRepository
impl RefUnwindSafe for FileSystemRepository
impl Send for FileSystemRepository
impl Sync for FileSystemRepository
impl Unpin for FileSystemRepository
impl UnsafeUnpin for FileSystemRepository
impl UnwindSafe for FileSystemRepository
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