Struct xvc_pipeline::deps::regex_items::RegexItemsDep
source · pub struct RegexItemsDep {
pub path: XvcPath,
pub regex: String,
pub lines: Vec<String>,
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: Vec<String>§xvc_metadata: Option<XvcMetadata>Implementations§
source§impl RegexItemsDep
impl RegexItemsDep
pub fn new(path: XvcPath, regex: String) -> Self
pub fn update_metadata(self, xvc_metadata: Option<XvcMetadata>) -> Self
pub fn update_metadata_from_pmm(self, pmm: &XvcPathMetadataMap) -> Self
pub fn update_lines(self, xvc_root: &XvcRoot) -> Self
pub fn regex(&self) -> Regex
Trait Implementations§
source§impl Clone for RegexItemsDep
impl Clone for RegexItemsDep
source§fn clone(&self) -> RegexItemsDep
fn clone(&self) -> RegexItemsDep
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RegexItemsDep
impl Debug for RegexItemsDep
source§impl<'de> Deserialize<'de> for RegexItemsDep
impl<'de> Deserialize<'de> for RegexItemsDep
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 RegexItemsDep
impl Diffable for RegexItemsDep
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>
⚠️ Call 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>
⚠️ Call actual.update_lines before calling this function ⚠️
§type Item = RegexItemsDep
type Item = RegexItemsDep
The type of the entity to compare.
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 RegexItemsDep
impl Into<XvcDependency> for RegexItemsDep
source§fn into(self) -> XvcDependency
fn into(self) -> XvcDependency
Converts this type into the (usually inferred) input type.
source§impl Ord for RegexItemsDep
impl Ord for RegexItemsDep
source§fn cmp(&self, other: &RegexItemsDep) -> Ordering
fn cmp(&self, other: &RegexItemsDep) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RegexItemsDep> for RegexItemsDep
impl PartialEq<RegexItemsDep> for RegexItemsDep
source§fn eq(&self, other: &RegexItemsDep) -> bool
fn eq(&self, other: &RegexItemsDep) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<RegexItemsDep> for RegexItemsDep
impl PartialOrd<RegexItemsDep> for RegexItemsDep
source§fn partial_cmp(&self, other: &RegexItemsDep) -> Option<Ordering>
fn partial_cmp(&self, other: &RegexItemsDep) -> Option<Ordering>
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 Serialize for RegexItemsDep
impl Serialize for RegexItemsDep
source§impl Storable for RegexItemsDep
impl Storable for RegexItemsDep
source§fn type_description() -> String
fn type_description() -> String
A string representation for the type. Read more
impl Eq for RegexItemsDep
impl StructuralEq for RegexItemsDep
impl StructuralPartialEq for RegexItemsDep
Auto Trait Implementations§
impl RefUnwindSafe for RegexItemsDep
impl Send for RegexItemsDep
impl Sync for RegexItemsDep
impl Unpin for RegexItemsDep
impl UnwindSafe for RegexItemsDep
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.