pub struct SourceProvenance {
pub git: BTreeMap<String, String>,
pub source_fingerprint: String,
pub source_tree_fingerprint: String,
}Expand description
Git and source-tree provenance for evidence-producing runs.
Fields§
§git: BTreeMap<String, String>Raw git facts captured from the source workspace.
source_fingerprint: StringCommit/dirty-state source identity used by release evidence gates.
source_tree_fingerprint: StringSource-tree content identity used to tolerate evidence-only commit drift.
Implementations§
Source§impl SourceProvenance
impl SourceProvenance
Sourcepub fn capture_current() -> Self
pub fn capture_current() -> Self
Capture provenance for the current working directory.
Sourcepub fn capture_at(workspace_root: &Path) -> Self
pub fn capture_at(workspace_root: &Path) -> Self
Capture provenance for workspace_root.
Sourcepub fn validate(&self) -> Result<(), BackendError>
pub fn validate(&self) -> Result<(), BackendError>
Validate that required provenance fields are non-empty and shaped.
§Errors
Returns BackendError::InvalidProgram when an evidence producer
attempts to emit a weak source identity.
Trait Implementations§
Source§impl Clone for SourceProvenance
impl Clone for SourceProvenance
Source§fn clone(&self) -> SourceProvenance
fn clone(&self) -> SourceProvenance
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 SourceProvenance
impl Debug for SourceProvenance
Source§impl<'de> Deserialize<'de> for SourceProvenance
impl<'de> Deserialize<'de> for SourceProvenance
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
impl Eq for SourceProvenance
Source§impl PartialEq for SourceProvenance
impl PartialEq for SourceProvenance
Source§fn eq(&self, other: &SourceProvenance) -> bool
fn eq(&self, other: &SourceProvenance) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SourceProvenance
impl Serialize for SourceProvenance
impl StructuralPartialEq for SourceProvenance
Auto Trait Implementations§
impl Freeze for SourceProvenance
impl RefUnwindSafe for SourceProvenance
impl Send for SourceProvenance
impl Sync for SourceProvenance
impl Unpin for SourceProvenance
impl UnsafeUnpin for SourceProvenance
impl UnwindSafe for SourceProvenance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.