[][src]Struct x509_parser::ASN1Time

pub struct ASN1Time(_);

An ASN.1 timestamp.

Implementations

impl ASN1Time[src]

pub fn from_timestamp(secs: i64) -> Self[src]

Makes a new ASN1Time from the number of non-leap seconds since Epoch

pub fn timestamp(&self) -> i64[src]

Returns the number of non-leap seconds since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp").

pub fn now() -> Self[src]

Returns a ASN1Time which corresponds to the current date.

pub fn to_rfc2822(&self) -> String[src]

Returns an RFC 2822 date and time string such as Tue, 1 Jul 2003 10:52:37 +0200.

Trait Implementations

impl Add<Duration> for ASN1Time[src]

type Output = Option<ASN1Time>

The resulting type after applying the + operator.

impl Clone for ASN1Time[src]

impl Copy for ASN1Time[src]

impl Debug for ASN1Time[src]

impl Eq for ASN1Time[src]

impl Hash for ASN1Time[src]

impl Ord for ASN1Time[src]

impl PartialEq<ASN1Time> for ASN1Time[src]

impl PartialOrd<ASN1Time> for ASN1Time[src]

impl StructuralEq for ASN1Time[src]

impl StructuralPartialEq for ASN1Time[src]

impl Sub<ASN1Time> for ASN1Time[src]

type Output = Option<Duration>

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.