pub struct Validity { /* private fields */ }Expand description
The interval a certificate says it may be relied on within.
Implementations§
Source§impl Validity
impl Validity
Sourcepub fn not_before(self) -> Time
pub fn not_before(self) -> Time
The first moment.
Sourcepub fn is_well_ordered(self) -> bool
pub fn is_well_ordered(self) -> bool
Whether the interval ends no earlier than it begins.
A certificate whose interval runs backwards is never valid at any moment. It is reported rather than refused, because a person holding such a document is owed an explanation of it.
Sourcepub fn contains(self, moment: Time) -> bool
pub fn contains(self, moment: Time) -> bool
Whether a moment lies in the interval, at either end included.
Sourcepub fn covers(self, from: Time, to: Time) -> bool
pub fn covers(self, from: Time, to: Time) -> bool
Whether the whole of an interval lies inside this one.
This, not Self::contains, is the question the product asks. What is
known about when a signature was made is an interval, and resolving it
at one end would report a signature made before a certificate existed,
or before it was revoked, as one made while it was good.
Trait Implementations§
impl Copy for Validity
impl Eq for Validity
impl StructuralPartialEq for Validity
Auto Trait Implementations§
impl Freeze for Validity
impl RefUnwindSafe for Validity
impl Send for Validity
impl Sync for Validity
impl Unpin for Validity
impl UnsafeUnpin for Validity
impl UnwindSafe for Validity
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