pub struct AttestationLedger { /* private fields */ }Expand description
Every frame’s attestation state from one fan-out, keyed by identity — the
join the composer reads so an AuditEntry can
say whether the evidence it quotes was signed.
An empty ledger is not “nothing was attested”: it is “nothing was
checked”, and a lookup returns AttestationState::NotChecked to say so.
Implementations§
Source§impl AttestationLedger
impl AttestationLedger
Sourcepub fn new() -> Self
pub fn new() -> Self
An empty ledger: every lookup is AttestationState::NotChecked.
Sourcepub fn record(&mut self, outcome: FrameAttestationOutcome)
pub fn record(&mut self, outcome: FrameAttestationOutcome)
Record one frame’s outcome, replacing any previous entry for the same identity.
Sourcepub fn state_for(&self, frame: &FrameId) -> AttestationState
pub fn state_for(&self, frame: &FrameId) -> AttestationState
The state recorded for a frame, or AttestationState::NotChecked when
this ledger has nothing to say about it.
Trait Implementations§
Source§impl Clone for AttestationLedger
impl Clone for AttestationLedger
Source§fn clone(&self) -> AttestationLedger
fn clone(&self) -> AttestationLedger
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 AttestationLedger
impl Debug for AttestationLedger
Source§impl Default for AttestationLedger
impl Default for AttestationLedger
Source§fn default() -> AttestationLedger
fn default() -> AttestationLedger
Returns the “default value” for a type. Read more
impl Eq for AttestationLedger
Source§impl FromIterator<FrameAttestationOutcome> for AttestationLedger
impl FromIterator<FrameAttestationOutcome> for AttestationLedger
Source§fn from_iter<I: IntoIterator<Item = FrameAttestationOutcome>>(
outcomes: I,
) -> Self
fn from_iter<I: IntoIterator<Item = FrameAttestationOutcome>>( outcomes: I, ) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for AttestationLedger
impl PartialEq for AttestationLedger
impl StructuralPartialEq for AttestationLedger
Auto Trait Implementations§
impl Freeze for AttestationLedger
impl RefUnwindSafe for AttestationLedger
impl Send for AttestationLedger
impl Sync for AttestationLedger
impl Unpin for AttestationLedger
impl UnsafeUnpin for AttestationLedger
impl UnwindSafe for AttestationLedger
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