Struct xvc_pipeline::deps::regex::RegexDep
source · pub struct RegexDep {
pub path: XvcPath,
pub regex: String,
pub lines_digest: Option<ContentDigest>,
pub xvc_metadata: Option<XvcMetadata>,
}Expand description
When a step depends to a regex searched in a text file
Fields§
§path: XvcPathPath of the file in the workspace
regex: StringThe regex to search in the file
lines_digest: Option<ContentDigest>§xvc_metadata: Option<XvcMetadata>Implementations§
source§impl RegexDep
impl RegexDep
pub fn new(path: XvcPath, regex: String) -> Self
pub fn update_metadata(self, xvc_metadata: Option<XvcMetadata>) -> Self
pub fn update_digest(self, xvc_root: &XvcRoot, algorithm: HashAlgorithm) -> Self
pub fn regex(&self) -> Regex
Trait Implementations§
source§impl<'de> Deserialize<'de> for RegexDep
impl<'de> Deserialize<'de> for RegexDep
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 RegexDep
impl Diffable for RegexDep
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>
⚠️ Update the metadata with actual.update_metadata before calling this function
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>
⚠️ Update the metadata and lines with actual.update_digest before calling this function
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 RegexDep
impl Into<XvcDependency> for RegexDep
source§fn into(self) -> XvcDependency
fn into(self) -> XvcDependency
Converts this type into the (usually inferred) input type.
source§impl Ord for RegexDep
impl Ord for RegexDep
source§impl PartialEq<RegexDep> for RegexDep
impl PartialEq<RegexDep> for RegexDep
source§impl PartialOrd<RegexDep> for RegexDep
impl PartialOrd<RegexDep> for RegexDep
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 RegexDep
impl Storable for RegexDep
source§fn type_description() -> String
fn type_description() -> String
A string representation for the type. Read more
impl Eq for RegexDep
impl StructuralEq for RegexDep
impl StructuralPartialEq for RegexDep
Auto Trait Implementations§
impl RefUnwindSafe for RegexDep
impl Send for RegexDep
impl Sync for RegexDep
impl Unpin for RegexDep
impl UnwindSafe for RegexDep
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.