pub struct XvcPathMetadataProvider { /* private fields */ }
Expand description
A cached path metadata provider.
It starts from xvc_root
and caches XvcMetadata when the paths are requested.
Implementations§
Source§impl XvcPathMetadataProvider
impl XvcPathMetadataProvider
Sourcepub fn new(output_sender: &XvcOutputSender, xvc_root: &XvcRoot) -> Result<Self>
pub fn new(output_sender: &XvcOutputSender, xvc_root: &XvcRoot) -> Result<Self>
Create a new PathMetadataProvider
Sourcepub fn get(&self, path: &XvcPath) -> Option<XvcMetadata>
pub fn get(&self, path: &XvcPath) -> Option<XvcMetadata>
Returns the XvcMetadata for a given XvcPath.
Sourcepub fn path_present(&self, path: &XvcPath) -> bool
pub fn path_present(&self, path: &XvcPath) -> bool
Returns true if the path is present in the repository.
Sourcepub fn glob_paths(&self, glob: &str) -> Result<XvcPathMetadataMap>
pub fn glob_paths(&self, glob: &str) -> Result<XvcPathMetadataMap>
Return all paths from the disk specified with glob
Sourcepub fn current_path_metadata_map_clone(&self) -> Result<XvcPathMetadataMap>
pub fn current_path_metadata_map_clone(&self) -> Result<XvcPathMetadataMap>
Return a snapshot of the current path metadata map. This is a clone of the internal map and is not updated. Intended to be used in testing.
Trait Implementations§
Source§impl Debug for XvcPathMetadataProvider
impl Debug for XvcPathMetadataProvider
Auto Trait Implementations§
impl Freeze for XvcPathMetadataProvider
impl RefUnwindSafe for XvcPathMetadataProvider
impl Send for XvcPathMetadataProvider
impl Sync for XvcPathMetadataProvider
impl Unpin for XvcPathMetadataProvider
impl UnwindSafe for XvcPathMetadataProvider
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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