pub enum SemanticsCheck {
Verified,
VerifiedPrevious([u8; 32]),
Mismatch,
}Expand description
What a stored arithmetic identifier says about the data stamped with it.
Returned by check_semantics. The previous case is its own variant so
a reader never treats “computed by an earlier release with the same bits”
as silently equal to “computed by this release”.
Variants§
Verified
The identifier is SEMANTICS_ID.
VerifiedPrevious([u8; 32])
The identifier is one of PREVIOUS_SEMANTICS_IDS: an earlier
release, same bits on every function it covered.
Mismatch
Unknown: the data was computed with arithmetic this release does not promise to reproduce.
Implementations§
Source§impl SemanticsCheck
impl SemanticsCheck
Sourcepub const fn is_reproducible(self) -> bool
pub const fn is_reproducible(self) -> bool
Accepting: Verified or
VerifiedPrevious.
For readers of stored data (residuals, law identifiers, snapshots): the stored values are reproduced exactly by this release.
Sourcepub const fn is_current(self) -> bool
pub const fn is_current(self) -> bool
Strict: Verified only.
For comparing identifiers as keys (a cache keyed on the identifier, a peer that must run exactly this release, a writer checking what it is about to stamp), where an earlier identifier is a different key even though the bits agree.