pub struct UtcTime {
pub datetime: DateTime,
pub precision: TimePrecision,
}Expand description
Represents a parsed ASN.1 UTCTime value (X.680 clause 47). UTCTime consists of a calendar date (YYMMDD), time to a precision of minutes or seconds, and an optional local time differential from UTC.
Fields§
§datetime: DateTime§precision: TimePrecisionImplementations§
Source§impl UtcTime
impl UtcTime
Sourcepub open spec fn wf(&self) -> bool
pub open spec fn wf(&self) -> bool
{
&&& datetime_wf(self.datetime)
&&& 1950 <= self.datetime.year <= 2049
&&& (self.precision == TimePrecision::Minute
|| self.precision == TimePrecision::Second)
&&& (self.precision == TimePrecision::Second || self.datetime.second == 0)
}Validates semantic well-formedness of the UTCTime value. Under X.680 clause 47.3, year is limited to the range 1950 to 2049.
Trait Implementations§
Source§impl DeepViewIdentity for UtcTime
impl DeepViewIdentity for UtcTime
Source§proof fn lemma_deep_view_identity(&self)
proof fn lemma_deep_view_identity(&self)
Source§impl DerOrd<UtcTime> for UtcTimeFmt<true>
impl DerOrd<UtcTime> for UtcTimeFmt<true>
Source§proof fn lemma_der_serialize_len(&self, value: UtcTime)
proof fn lemma_der_serialize_len(&self, value: UtcTime)
Source§open spec fn der_remaining(&self, value: UtcTime, state: UtcTimeDerState) -> Seq<u8>
open spec fn der_remaining(&self, value: UtcTime, state: UtcTimeDerState) -> Seq<u8>
{ self.spec_serialize(value).skip(state.pos as int) }Source§open spec fn der_state_valid(&self, value: UtcTime, state: UtcTimeDerState) -> bool
open spec fn der_state_valid(&self, value: UtcTime, state: UtcTimeDerState) -> bool
{
&&& state.pos <= 13
&&& state.bytes@ == self.spec_serialize(value)
}Source§exec fn der_start(&self, t: &UtcTime) -> state : UtcTimeDerState
exec fn der_start(&self, t: &UtcTime) -> state : UtcTimeDerState
Source§impl<Output: OutputBuf, const DER: bool> Serializer<Output, UtcTime> for UtcTimeFmt<DER>
impl<Output: OutputBuf, const DER: bool> Serializer<Output, UtcTime> for UtcTimeFmt<DER>
Source§exec fn serialize_into(&self, value: &UtcTime, obuf: &mut Output)
exec fn serialize_into(&self, value: &UtcTime, obuf: &mut Output)
impl Copy for UtcTime
impl Eq for UtcTime
impl Structural for UtcTime
impl StructuralPartialEq for UtcTime
Auto Trait Implementations§
impl Freeze for UtcTime
impl RefUnwindSafe for UtcTime
impl Send for UtcTime
impl Sync for UtcTime
impl Unpin for UtcTime
impl UnsafeUnpin for UtcTime
impl UnwindSafe for UtcTime
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