pub struct SnapshotVerifier<Rd> { /* private fields */ }Expand description
The edge facade for membership snapshots: trust, revocation replica and supersession ledger for one issuer. Holds no minter.
Implementations§
Source§impl<Rd> SnapshotVerifier<Rd>where
Rd: RevocationReader,
impl<Rd> SnapshotVerifier<Rd>where
Rd: RevocationReader,
Sourcepub fn new(trust: IssuerTrust, revoked: Rd) -> SnapshotVerifier<Rd>
pub fn new(trust: IssuerTrust, revoked: Rd) -> SnapshotVerifier<Rd>
pub fn trust(&self) -> &IssuerTrust
pub fn revocations(&self) -> &Rd
pub fn ledger(&self) -> &SnapshotLedger
Sourcepub async fn adopt(&self, token: &str) -> Result<SetSnapshot, VerifyError>
pub async fn adopt(&self, token: &str) -> Result<SetSnapshot, VerifyError>
Verify a snapshot that arrived by gossip (or the edge’s own persisted one at boot) and record its epoch, so it supersedes older snapshots of its resource. Checks the signature only.
Sourcepub async fn verify_snapshot_at(
&self,
token: &str,
now: i64,
) -> Result<VerifiedSnapshot, SnapshotError>
pub async fn verify_snapshot_at( &self, token: &str, now: i64, ) -> Result<VerifiedSnapshot, SnapshotError>
Accept token as a membership snapshot and work out who it still
admits.
In order: signature (recording the epoch in the ledger), supersession,
then one revocation read per member via — the only I/O. now
decides VerifiedSnapshot::lease and nothing else: there is no
expiry.
Trait Implementations§
Auto Trait Implementations§
impl<Rd> !Freeze for SnapshotVerifier<Rd>
impl<Rd> !RefUnwindSafe for SnapshotVerifier<Rd>
impl<Rd> !UnwindSafe for SnapshotVerifier<Rd>
impl<Rd> Send for SnapshotVerifier<Rd>where
Rd: Send,
impl<Rd> Sync for SnapshotVerifier<Rd>where
Rd: Sync,
impl<Rd> Unpin for SnapshotVerifier<Rd>where
Rd: Unpin,
impl<Rd> UnsafeUnpin for SnapshotVerifier<Rd>where
Rd: UnsafeUnpin,
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