Skip to main content

RevocationWindow

Struct RevocationWindow 

Source
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_at is 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. See RevocationBarrier.
  • until is the instant the barrier may be reaped, and is read only by Storage::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: SystemTime

The instant the revocation was made.

§until: SystemTime

The instant the barrier may be reaped.

Trait Implementations§

Source§

impl Clone for RevocationWindow

Source§

fn clone(&self) -> RevocationWindow

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RevocationWindow

Source§

impl Debug for RevocationWindow

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RevocationWindow

Source§

impl PartialEq for RevocationWindow

Source§

fn eq(&self, other: &RevocationWindow) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RevocationWindow

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.