Struct asn1_rs::GeneralizedTime
source · pub struct GeneralizedTime(pub ASN1DateTime);
Tuple Fields§
§0: ASN1DateTime
Implementations§
source§impl GeneralizedTime
impl GeneralizedTime
pub const fn new(datetime: ASN1DateTime) -> Self
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
sourcepub fn utc_datetime(&self) -> Result<OffsetDateTime>
pub fn utc_datetime(&self) -> Result<OffsetDateTime>
Return a ISO 8601 combined date and time with time zone.
Trait Implementations§
source§impl Debug for GeneralizedTime
impl Debug for GeneralizedTime
source§impl Display for GeneralizedTime
impl Display for GeneralizedTime
source§impl Ord for GeneralizedTime
impl Ord for GeneralizedTime
source§fn cmp(&self, other: &GeneralizedTime) -> Ordering
fn cmp(&self, other: &GeneralizedTime) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for GeneralizedTime
impl PartialEq for GeneralizedTime
source§fn eq(&self, other: &GeneralizedTime) -> bool
fn eq(&self, other: &GeneralizedTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for GeneralizedTime
impl PartialOrd for GeneralizedTime
source§fn partial_cmp(&self, other: &GeneralizedTime) -> Option<Ordering>
fn partial_cmp(&self, other: &GeneralizedTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ToDer for GeneralizedTime
impl ToDer for GeneralizedTime
source§fn to_der_len(&self) -> Result<usize>
fn to_der_len(&self) -> Result<usize>
Get the length of the object (including the header), when encoded
source§fn write_der_header(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_header(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER header to this writer.
source§fn write_der_content(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_content(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER content (all except header) to this writer.
source§fn to_der_vec(&self) -> SerializeResult<Vec<u8>>
fn to_der_vec(&self) -> SerializeResult<Vec<u8>>
Write the DER encoded representation to a newly allocated
Vec<u8>
.source§fn to_der_vec_raw(&self) -> SerializeResult<Vec<u8>>
fn to_der_vec_raw(&self) -> SerializeResult<Vec<u8>>
Similar to using
to_vec
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.source§fn write_der(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER encoded representation (header and content) into this writer. Read more
source§fn write_der_raw(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_raw(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Similar to using
to_der
, but uses provided values without changes.
This can generate an invalid encoding for a DER object.source§impl<'a, 'b> TryFrom<&'b Any<'a>> for GeneralizedTime
impl<'a, 'b> TryFrom<&'b Any<'a>> for GeneralizedTime
source§impl<'a> TryFrom<Any<'a>> for GeneralizedTime
impl<'a> TryFrom<Any<'a>> for GeneralizedTime
impl DerAutoDerive for GeneralizedTime
impl Eq for GeneralizedTime
impl StructuralPartialEq for GeneralizedTime
Auto Trait Implementations§
impl Freeze for GeneralizedTime
impl RefUnwindSafe for GeneralizedTime
impl Send for GeneralizedTime
impl Sync for GeneralizedTime
impl Unpin for GeneralizedTime
impl UnwindSafe for GeneralizedTime
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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