pub struct ArtifactId {
pub domain: &'static str,
pub label: String,
pub spec_fingerprint: [u8; 32],
pub variant: String,
pub derivation_version: DerivationVersion,
}Expand description
Identifier used for deterministic artifact cache entries.
Each field contributes to the derived seed, so two artifacts with the
same ArtifactId are guaranteed to be identical across runs.
Fields§
§domain: &'static strNamespace that separates unrelated fixture types (e.g. "rsa", "ecdsa").
label: StringUser-supplied label for this fixture (e.g. "issuer", "audience").
spec_fingerprint: [u8; 32]BLAKE3 hash of the spec’s stable byte representation.
variant: StringVariant tag (e.g. "default", "mismatch", "corrupt:bad-header").
derivation_version: DerivationVersionWhich derivation algorithm version to use.
Implementations§
Source§impl ArtifactId
impl ArtifactId
Sourcepub fn new(
domain: &'static str,
label: impl Into<String>,
spec_bytes: &[u8],
variant: impl Into<String>,
derivation_version: DerivationVersion,
) -> ArtifactId
pub fn new( domain: &'static str, label: impl Into<String>, spec_bytes: &[u8], variant: impl Into<String>, derivation_version: DerivationVersion, ) -> ArtifactId
Create a new artifact identifier by hashing spec_bytes into a fingerprint.
Trait Implementations§
Source§impl Clone for ArtifactId
impl Clone for ArtifactId
Source§fn clone(&self) -> ArtifactId
fn clone(&self) -> ArtifactId
Returns a duplicate 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 ArtifactId
impl Debug for ArtifactId
Source§impl Hash for ArtifactId
impl Hash for ArtifactId
Source§impl Ord for ArtifactId
impl Ord for ArtifactId
Source§fn cmp(&self, other: &ArtifactId) -> Ordering
fn cmp(&self, other: &ArtifactId) -> 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 for ArtifactId
impl PartialEq for ArtifactId
Source§impl PartialOrd for ArtifactId
impl PartialOrd for ArtifactId
impl Eq for ArtifactId
impl StructuralPartialEq for ArtifactId
Auto Trait Implementations§
impl Freeze for ArtifactId
impl RefUnwindSafe for ArtifactId
impl Send for ArtifactId
impl Sync for ArtifactId
impl Unpin for ArtifactId
impl UnsafeUnpin for ArtifactId
impl UnwindSafe for ArtifactId
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