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

pub trait Connector: Sized {
    fn connect(
        addr: &SocketAddr,
        tls_parameters: Option<&ClientTlsParameters>
    ) -> Result<Self>;
fn upgrade_tls(
        &mut self,
        tls_parameters: &ClientTlsParameters
    ) -> Result<()>;
fn is_encrypted(&self) -> bool; }

A trait for the concept of opening a stream

Required methods

fn connect(
    addr: &SocketAddr,
    tls_parameters: Option<&ClientTlsParameters>
) -> Result<Self>

Opens a connection to the given IP socket

fn upgrade_tls(&mut self, tls_parameters: &ClientTlsParameters) -> Result<()>

Upgrades to TLS connection

fn is_encrypted(&self) -> bool

Is the NetworkStream encrypted

Loading content...

Implementors

impl Connector for NetworkStream[src]

Loading content...