pub struct Interval { /* private fields */ }Expand description
The UTC-label interval the path is built for, retaining leap/fractional labels.
A signature is placed in an interval rather than at an instant, because what a timestamp proves is an upper bound and the lower one is usually unknown. A certificate takes part in a path only where it was valid across the whole of it: resolving at one end would let a signature made before a certificate existed pass on the strength of a later moment.
Ordinary whole-second constructors remain available. Use the Instant
constructors for fractional or inserted-second endpoints; caller-supplied
leap facts authenticate their occurrence separately from this comparison.
Implementations§
Source§impl Interval
impl Interval
Sourcepub fn between(first: i64, second: i64) -> Self
pub fn between(first: i64, second: i64) -> Self
The interval between two moments, whichever way round the caller hands them: an interval is a pair of bounds, not an ordering.
Sourcepub fn at(moment: i64) -> Self
pub fn at(moment: i64) -> Self
The interval that is one moment, which is what a caller has when the signing time is known exactly and nothing wider has to be covered.
Sourcepub fn between_instants(first: Instant, second: Instant) -> Self
pub fn between_instants(first: Instant, second: Instant) -> Self
The interval between two lossless labels, in either input order.
Sourcepub fn at_instant(moment: Instant) -> Self
pub fn at_instant(moment: Instant) -> Self
A point interval retaining the supplied leap flag and nanoseconds.
Sourcepub fn from(self) -> i64
pub fn from(self) -> i64
The earlier bound’s lossy POSIX projection, without fractional precision.
Sourcepub fn from_instant(self) -> Instant
pub fn from_instant(self) -> Instant
The earlier lossless UTC label.
Sourcepub fn to_instant(self) -> Instant
pub fn to_instant(self) -> Instant
The later lossless UTC label.