pub struct RevocationWindow {
pub recorded_at: SystemTime,
pub until: SystemTime,
}Expand description
WHEN a revocation happened, and how long its barrier stands.
The two instants answer different questions and a store needs both, which is why they travel
together in one value rather than as two SystemTime parameters: both have the same type, so a
positional pair could be passed the wrong way round and still compile, and the failure would be
a barrier that refuses nothing (recorded_at far in the future is compared against by every
write) or one that never expires. Naming them makes that mistake impossible to write.
recorded_atis the instant the revocation was made. A write is refused only when the GRANT behind it was established at or before this instant, for the two scopes where an identity can legitimately be established again. SeeRevocationBarrier.untilis the instant the barrier may be reaped, and is read only byStorage::sweep_expired. It must be at least as far out as the longest-lived record the revocation was entitled to kill.
Both are supplied by the caller rather than taken from the store’s own clock, because only the caller knows the configured lifetimes, and because a store that read the wall clock could not be driven deterministically by a test.
Fields§
§recorded_at: SystemTimeThe instant the revocation was made.
until: SystemTimeThe instant the barrier may be reaped.
Trait Implementations§
Source§impl Clone for RevocationWindow
impl Clone for RevocationWindow
Source§fn clone(&self) -> RevocationWindow
fn clone(&self) -> RevocationWindow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more