Trait async_smtp::smtp::client::net::Connector[][src]

pub trait Connector: Sized {
#[must_use]    fn connect<'life0, 'life1, 'async_trait>(
        addr: &'life0 SocketAddr,
        timeout: Option<Duration>,
        tls_parameters: Option<&'life1 ClientTlsParameters>
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn upgrade_tls<'life0, 'async_trait>(
        self,
        tls_parameters: &'life0 ClientTlsParameters
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn is_encrypted(&self) -> bool; }

A trait for the concept of opening a stream

Required methods

#[must_use]fn connect<'life0, 'life1, 'async_trait>(
    addr: &'life0 SocketAddr,
    timeout: Option<Duration>,
    tls_parameters: Option<&'life1 ClientTlsParameters>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Opens a connection to the given IP socket

#[must_use]fn upgrade_tls<'life0, 'async_trait>(
    self,
    tls_parameters: &'life0 ClientTlsParameters
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Upgrades to TLS connection

fn is_encrypted(&self) -> bool[src]

Is the NetworkStream encrypted

Loading content...

Implementors

impl Connector for NetworkStream[src]

Loading content...