pub struct Time { /* private fields */ }Expand description
A moment, and how the certificate wrote it.
Two times are equal when they name the same moment. The form is what the certificate used to say it, not part of which moment it is.
Implementations§
Source§impl Time
impl Time
Sourcepub fn xsd10_label<W: Work>(
self,
execution: &W,
) -> Result<Xsd10Label, MemoryError>
pub fn xsd10_label<W: Work>( self, execution: &W, ) -> Result<Xsd10Label, MemoryError>
Project the original UTC label into XSD1.0 year numbering.
This retains second sixty; Xsd10Label::at_utc performs the separate
XSD value normalization. It does not change this time’s UTC identity.
Sourcepub fn calendar_at_minutes<W: Work>(
self,
minutes: i16,
execution: &W,
) -> Result<Calendar, MemoryError>
pub fn calendar_at_minutes<W: Work>( self, minutes: i16, execution: &W, ) -> Result<Calendar, MemoryError>
Project the original label at a signed calendar offset.
Offset minutes need not describe a valid wire timezone; this also permits
inspecting the previous local date of a midnight label without a second
calendar implementation. No UTC correction history is inferred.
The same inverse Gregorian core serves Self’s text rendering.
§Panics
Only if that private Gregorian core violates its bounded component invariants; parsed time labels and any i16-minute offset preserve them.
Sourcepub fn seconds(self) -> i64
pub fn seconds(self) -> i64
POSIX label, negative before the epoch. For an inserted second this
is the preceding ordinary second’s label. Use Self::instant for
comparisons and crate::temporal::LeapTable for elapsed arithmetic.
Sourcepub fn instant(self) -> Instant
pub fn instant(self) -> Instant
The lossless UTC label; parsing does not authenticate its occurrence.
Sourcepub fn is_leap_second(self) -> bool
pub fn is_leap_second(self) -> bool
Whether the encoded time labels an inserted second.
Sourcepub fn is_no_well_defined_expiry(self) -> bool
pub fn is_no_well_defined_expiry(self) -> bool
Whether this is the moment the profile uses to mean that no expiry was defined. What that means for a verdict is a policy question, and this only reports that the certificate said it.