Struct ssl_expiration2::SslExpiration[][src]

pub struct SslExpiration(_);

Implementations

impl SslExpiration[src]

pub fn from_domain_name(domain: &str) -> Result<SslExpiration>[src]

Creates new SslExpiration from domain name.

This function will use HTTPS port (443) to check SSL certificate with 30 seconds timeout.

pub fn from_domain_name_with_timeout(
    domain: &str,
    timeout: u64
) -> Result<SslExpiration>
[src]

This function will use HTTPS port (443) to check SSL certificate with custom timeout.

pub fn from_addr<A: ToSocketAddrs>(
    addr: A,
    domain: &str,
    timeout: u64
) -> Result<SslExpiration>
[src]

Creates new SslExpiration from SocketAddr.

pub fn secs(&self) -> i32[src]

How many seconds until SSL certificate expires.

This function will return minus if SSL certificate is already expired.

pub fn days(&self) -> i32[src]

How many days until SSL certificate expires

This function will return minus if SSL certificate is already expired.

pub fn is_expired(&self) -> bool[src]

Returns true if SSL certificate is expired

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, 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.