pub struct CertificateLedger { /* private fields */ }Expand description
The fit’s certificate ledger: every certificate the fit produced, keyed by claim id, in stable order. This is the single inspectable artifact that replaces the scattered per-feature payload keys.
The ledger never fabricates a verdict: a claim that was not evaluated simply
is absent (queried as Verdict::Unavailable via Self::verdict_of).
Implementations§
Source§impl CertificateLedger
impl CertificateLedger
pub fn new() -> Self
Sourcepub fn record<C: Certificate>(&mut self, certificate: &C)
pub fn record<C: Certificate>(&mut self, certificate: &C)
Record one certificate. If two certificates share a claim id, they are combined conservatively: the retained verdict is the WEAKER of the two (so duplicate evidence can never upgrade a claim past its weakest witness), and the evidence of the weaker verdict is kept.
Sourcepub fn record_entry(&mut self, entry: LedgerEntry)
pub fn record_entry(&mut self, entry: LedgerEntry)
Record a pre-built entry (for certificates whose owning type lives behind a boundary that only hands back the folded record).
Sourcepub fn verdict_of(&self, claim_id: &str) -> Verdict
pub fn verdict_of(&self, claim_id: &str) -> Verdict
The verdict for a claim id, or Verdict::Unavailable if the fit never
recorded it — the absence of a certificate is “no claim”, never a pass.
Sourcepub fn entries(&self) -> impl Iterator<Item = &LedgerEntry>
pub fn entries(&self) -> impl Iterator<Item = &LedgerEntry>
All recorded entries in stable (claim-id) order.
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn overall(&self) -> Verdict
pub fn overall(&self) -> Verdict
The conservative roll-up across the whole ledger: the WEAKEST verdict of
any recorded claim (the meet over the soundness lattice). An empty ledger
rolls up to Verdict::Unavailable. This is the single number that
answers “did everything this fit could certify, certify?” — and it cannot
be stronger than its weakest member.
Trait Implementations§
Source§impl Clone for CertificateLedger
impl Clone for CertificateLedger
Source§fn clone(&self) -> CertificateLedger
fn clone(&self) -> CertificateLedger
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CertificateLedger
impl Debug for CertificateLedger
Source§impl Default for CertificateLedger
impl Default for CertificateLedger
Source§fn default() -> CertificateLedger
fn default() -> CertificateLedger
Source§impl PartialEq for CertificateLedger
impl PartialEq for CertificateLedger
Source§fn eq(&self, other: &CertificateLedger) -> bool
fn eq(&self, other: &CertificateLedger) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CertificateLedger
Auto Trait Implementations§
impl Freeze for CertificateLedger
impl RefUnwindSafe for CertificateLedger
impl Send for CertificateLedger
impl Sync for CertificateLedger
impl Unpin for CertificateLedger
impl UnsafeUnpin for CertificateLedger
impl UnwindSafe for CertificateLedger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.