pub struct Provenance {
pub profile: ProvenanceProfile,
pub source_input_hash: HashState,
pub ir_hash: HashState,
pub cache_valid: bool,
}Expand description
An artifact’s provenance record, validated BY PROFILE.
Fields§
§profile: ProvenanceProfileWhich profile produced the artifact.
source_input_hash: HashStateHash of the source input.
ir_hash: HashStateHash of the lowered IR (legal to be Unhashed for the Reference profile).
cache_valid: boolWhether the artifact may be served from cache.
Implementations§
Source§impl Provenance
impl Provenance
Sourcepub fn reference(source_input_hash: HashState) -> Self
pub fn reference(source_input_hash: HashState) -> Self
A fresh reference-build provenance: ir_hash unhashed, never cache-valid.
Sourcepub fn validate(&self) -> Result<(), CompileError>
pub fn validate(&self) -> Result<(), CompileError>
Validates the record against its own profile. Every profile requires a real
source_input_hash. Reference is legal with an unhashed IR; Ir and CachedArtifact
require a real IR hash too. Only CachedArtifact may be cache_valid, and it must be.
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
impl Copy for Provenance
Source§impl Debug for Provenance
impl Debug for Provenance
impl Eq for Provenance
Source§impl PartialEq for Provenance
impl PartialEq 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