pub struct GlobDep {
pub glob: String,
pub xvc_paths_digest: Option<PathCollectionDigest>,
pub xvc_metadata_digest: Option<PathCollectionMetadataDigest>,
pub content_digest: Option<PathCollectionContentDigest>,
}
Expand description
Invalidates when contents of any of the files in the directory changes.
Fields§
§glob: String
The glob pattern to match files against.
xvc_paths_digest: Option<PathCollectionDigest>
The digest of the paths in the glob.
xvc_metadata_digest: Option<PathCollectionMetadataDigest>
The digest of the metadata of the paths in the glob.
content_digest: Option<PathCollectionContentDigest>
The digest of the content of the paths in the glob.
Implementations§
Source§impl GlobDep
impl GlobDep
Sourcepub fn update_collection_digests(
self,
pmp: &XvcPathMetadataProvider,
) -> Result<Self>
pub fn update_collection_digests( self, pmp: &XvcPathMetadataProvider, ) -> Result<Self>
Collects the paths in the glob from pmm
, sorts and hashes the list to update the xvc_paths_digest
Sourcepub fn update_content_digest(
self,
xvc_root: &XvcRoot,
pmp: &XvcPathMetadataProvider,
) -> Result<Self>
pub fn update_content_digest( self, xvc_root: &XvcRoot, pmp: &XvcPathMetadataProvider, ) -> Result<Self>
Collects the paths in the glob from pmm
, reads the contents of the files, sorts and hashes the list to update the content_digest
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GlobDep
impl<'de> Deserialize<'de> for GlobDep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Diffable for GlobDep
impl Diffable for GlobDep
Source§fn diff_superficial(
record: &Self::Item,
actual: &Self::Item,
) -> Diff<Self::Item>
fn diff_superficial( record: &Self::Item, actual: &Self::Item, ) -> Diff<Self::Item>
This is to compare two entities with a quick comparison.
Example: metadata of a file, timestamp of a URL etc.
You may need to update actual’s metadata or timestamp before calling this.
Source§fn diff_thorough(record: &Self::Item, actual: &Self::Item) -> Diff<Self::Item>
fn diff_thorough(record: &Self::Item, actual: &Self::Item) -> Diff<Self::Item>
This is to calculate two entities with a thorough comparison.
Example: content of a file, content of a URL etc.
You may need to update actual’s content before calling this.
Source§fn diff(
record: Option<&Self::Item>,
actual: Option<&Self::Item>,
) -> Diff<Self::Item>
fn diff( record: Option<&Self::Item>, actual: Option<&Self::Item>, ) -> Diff<Self::Item>
⚠️ Usually you must update actual’s metadata and timestamp before calling this.
Use diff_superficial and diff_thorough for shortcut comparisons. (e.g. when metadata is not changed, no need to
compare the content. ) Read more
Source§impl From<GlobDep> for XvcDependency
impl From<GlobDep> for XvcDependency
Source§impl Ord for GlobDep
impl Ord for GlobDep
Source§impl PartialOrd for GlobDep
impl PartialOrd for GlobDep
Source§impl Storable for GlobDep
impl Storable for GlobDep
Source§fn type_description() -> String
fn type_description() -> String
A string representation for the type. Read more
impl Eq for GlobDep
impl StructuralPartialEq for GlobDep
Auto Trait Implementations§
impl Freeze for GlobDep
impl RefUnwindSafe for GlobDep
impl Send for GlobDep
impl Sync for GlobDep
impl Unpin for GlobDep
impl UnwindSafe for GlobDep
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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