pub struct AllowedNoncesView {
by_nonce: HashMap<String, BootstrapNonceEntry>,
}Expand description
Lookup by nonce. Empty by default; replaced wholesale per poll.
Fields§
§by_nonce: HashMap<String, BootstrapNonceEntry>nonce -> entry. Read by the enrolment handler.
Implementations§
Source§impl AllowedNoncesView
impl AllowedNoncesView
pub fn from_artifact(artifact: BootstrapNonces) -> Self
pub fn lookup(&self, nonce: &str) -> Option<&BootstrapNonceEntry>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn entry_is_live(entry: &BootstrapNonceEntry, now: DateTime<Utc>) -> bool
pub fn entry_is_live(entry: &BootstrapNonceEntry, now: DateTime<Utc>) -> bool
True iff entry.expires_at >= now. Defense-in-depth: the release
tool prunes expired entries at sign time, but clock skew between
CP and CI could let one through.
Trait Implementations§
Source§impl Clone for AllowedNoncesView
impl Clone for AllowedNoncesView
Source§fn clone(&self) -> AllowedNoncesView
fn clone(&self) -> AllowedNoncesView
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 AllowedNoncesView
impl Debug for AllowedNoncesView
Source§impl Default for AllowedNoncesView
impl Default for AllowedNoncesView
Source§fn default() -> AllowedNoncesView
fn default() -> AllowedNoncesView
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AllowedNoncesView
impl RefUnwindSafe for AllowedNoncesView
impl Send for AllowedNoncesView
impl Sync for AllowedNoncesView
impl Unpin for AllowedNoncesView
impl UnwindSafe for AllowedNoncesView
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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