pub struct UtcTime {
pub year: u16,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
}
Expand description
A UTC datetime returned by a token’s clock if present.
Fields§
§year: u16
Conformance: Guaranteed to be in range 0..=9999
month: u8
Conformance: Guaranteed to be in range 0..=99
day: u8
Conformance: Guaranteed to be in range 0..=99
hour: u8
Conformance: Guaranteed to be in range 0..=99
minute: u8
Conformance: Guaranteed to be in range 0..=99
second: u8
Conformance: Guaranteed to be in range 0..=99
Implementations§
source§impl UtcTime
impl UtcTime
sourcepub fn as_iso8601_string(&self) -> String
pub fn as_iso8601_string(&self) -> String
Stringify the structure in ISO 8601 format.
PKCS#11 and ISO are unrelated standards, and this function is provided only for convenience. ISO format is more widely recognized and parsable by various date/time utilities, while PKCS#11’s internal representation of this type is is not used elsewhere. Other than formatting, this crate does not guarantee or enforce any part of the ISO standard.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UtcTime
impl Send for UtcTime
impl Sync for UtcTime
impl Unpin 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