pub enum Freshness {
Fresh,
Stale {
age_ms: u64,
},
FromTheFuture {
skew_ms: u64,
},
}Expand description
What a verifier concluded about a control frame’s age.
Deliberately three-valued rather than a boolean. The two refusals are the same decision and different diagnoses: one is a frame that waited too long, which is what a replay looks like, and the other is a frame from a clock that disagrees with ours, which is what a misconfigured device looks like. A caller that renders them identically leaves an integrator unable to tell a fleet with a broken time source from a fleet under attack.
Variants§
Fresh
Inside both windows.
Stale
Older than the past window allows.
FromTheFuture
Stamped further ahead of the verifier’s clock than the future window allows.
Implementations§
Trait Implementations§
impl Copy for Freshness
impl Eq for Freshness
impl StructuralPartialEq for Freshness
Auto Trait Implementations§
impl Freeze for Freshness
impl RefUnwindSafe for Freshness
impl Send for Freshness
impl Sync for Freshness
impl Unpin for Freshness
impl UnsafeUnpin for Freshness
impl UnwindSafe for Freshness
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