Struct xvc_pipeline::deps::file::FileDep
source · pub struct FileDep {
pub path: XvcPath,
pub xvc_metadata: Option<XvcMetadata>,
pub content_digest: Option<ContentDigest>,
}Fields§
§path: XvcPathThe path in the workspace
xvc_metadata: Option<XvcMetadata>§content_digest: Option<ContentDigest>Implementations§
source§impl FileDep
impl FileDep
pub fn new(path: XvcPath) -> Self
pub fn from_pmm(path: &XvcPath, pmm: &XvcPathMetadataMap) -> Result<Self>
pub fn calculate_content_digest( self, xvc_root: &XvcRoot, algorithm: HashAlgorithm, text_or_binary: TextOrBinary ) -> Result<Self>
pub fn calculate_content_digest_if_changed( self, xvc_root: &XvcRoot, record: &Self, algorithm: HashAlgorithm, text_or_binary: TextOrBinary ) -> Result<Self>
Trait Implementations§
source§impl<'de> Deserialize<'de> for FileDep
impl<'de> Deserialize<'de> for FileDep
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 FileDep
impl Diffable for FileDep
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>
⚠️ Call actual.update_metadata and actual.calculate_content_digest_if_changed before calling this ⚠️
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.
e.g. 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(
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 Into<XvcDependency> for FileDep
impl Into<XvcDependency> for FileDep
source§fn into(self) -> XvcDependency
fn into(self) -> XvcDependency
Converts this type into the (usually inferred) input type.
source§impl Ord for FileDep
impl Ord for FileDep
source§impl PartialEq<FileDep> for FileDep
impl PartialEq<FileDep> for FileDep
source§impl PartialOrd<FileDep> for FileDep
impl PartialOrd<FileDep> for FileDep
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Storable for FileDep
impl Storable for FileDep
source§fn type_description() -> String
fn type_description() -> String
A string representation for the type. Read more
impl Eq for FileDep
impl StructuralEq for FileDep
impl StructuralPartialEq for FileDep
Auto Trait Implementations§
impl RefUnwindSafe for FileDep
impl Send for FileDep
impl Sync for FileDep
impl Unpin for FileDep
impl UnwindSafe for FileDep
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.