Struct xvc_pipeline::deps::param::ParamDep
source · pub struct ParamDep {
pub format: XvcParamFormat,
pub path: XvcPath,
pub key: String,
pub value: Option<XvcParamValue>,
pub xvc_metadata: Option<XvcMetadata>,
}Expand description
Invalidates when key in params file in path changes.
Fields§
§format: XvcParamFormatFormat of the params file. This is inferred from extension if not given.
path: XvcPathPath of the file in the workspace
key: StringKey like mydict.mykey to access the value
value: Option<XvcParamValue>The value of the key
xvc_metadata: Option<XvcMetadata>The metadata of the parameter file to detect if it has changed
Implementations§
source§impl ParamDep
impl ParamDep
pub fn new( path: &XvcPath, format: Option<XvcParamFormat>, key: String ) -> Result<Self>
pub fn update_metadata(self, pmm: &XvcPathMetadataMap) -> Result<Self>
pub fn update_value(self, xvc_root: &XvcRoot) -> Result<Self>
Trait Implementations§
source§impl<'de> Deserialize<'de> for ParamDep
impl<'de> Deserialize<'de> for ParamDep
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 ParamDep
impl Diffable for ParamDep
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_metadata and actual.update_value 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 ParamDep
impl Into<XvcDependency> for ParamDep
source§fn into(self) -> XvcDependency
fn into(self) -> XvcDependency
Converts this type into the (usually inferred) input type.
source§impl Ord for ParamDep
impl Ord for ParamDep
source§impl PartialEq<ParamDep> for ParamDep
impl PartialEq<ParamDep> for ParamDep
source§impl PartialOrd<ParamDep> for ParamDep
impl PartialOrd<ParamDep> for ParamDep
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 ParamDep
impl Storable for ParamDep
source§fn type_description() -> String
fn type_description() -> String
A string representation for the type. Read more
impl Eq for ParamDep
impl StructuralEq for ParamDep
impl StructuralPartialEq for ParamDep
Auto Trait Implementations§
impl RefUnwindSafe for ParamDep
impl Send for ParamDep
impl Sync for ParamDep
impl Unpin for ParamDep
impl UnwindSafe for ParamDep
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.