pub struct Provenance {
pub kind: String,
pub uri: Option<String>,
pub range: Option<String>,
pub digest: Option<String>,
pub method: Option<String>,
pub by: Option<String>,
}Expand description
One link in a frame’s provenance chain, ordered closest-to-source first.
Fields§
§kind: Stringe.g. “file”, “derivation”, “episode”.
uri: Option<String>§range: Option<String>§digest: Option<String>§method: Option<String>§by: Option<String>Implementations§
Source§impl Provenance
impl Provenance
Sourcepub fn is_file_provenance(&self) -> bool
pub fn is_file_provenance(&self) -> bool
Whether this link addresses bytes a host could independently re-read.
Sourcepub fn has_well_formed_digest(&self) -> bool
pub fn has_well_formed_digest(&self) -> bool
Whether the digest, if present, matches the grammar in SPEC.md §F5.
Absent counts as not well-formed: for file provenance the digest is what makes tamper-detection possible at all, and treating “no digest” as acceptable is how the guarantee stayed decorative for so long.
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§fn clone(&self) -> Provenance
fn clone(&self) -> Provenance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Provenance
impl Debug for Provenance
Source§impl<'de> Deserialize<'de> for Provenance
impl<'de> Deserialize<'de> for Provenance
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 PartialEq for Provenance
impl PartialEq for Provenance
Source§impl Serialize for Provenance
impl Serialize for Provenance
impl StructuralPartialEq for Provenance
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnsafeUnpin for Provenance
impl UnwindSafe for Provenance
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