Trait Session

Source
pub trait Session {
    // Required methods
    fn reset(&mut self);
    fn logout(&mut self) -> Result<()>;
    fn mail<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        from: &'life1 str,
        opts: &'life2 MailOptions,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn rcpt<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        to: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn data<'life0, 'async_trait, R>(
        &'life0 mut self,
        r: R,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where R: 'async_trait + AsyncRead + Send + Unpin,
             Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn auth_plain(&mut self, username: &str, password: &str) -> Result<()> { ... }
}

Required Methods§

Source

fn reset(&mut self)

Source

fn logout(&mut self) -> Result<()>

Source

fn mail<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, from: &'life1 str, opts: &'life2 MailOptions, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn rcpt<'life0, 'life1, 'async_trait>( &'life0 mut self, to: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn data<'life0, 'async_trait, R>( &'life0 mut self, r: R, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where R: 'async_trait + AsyncRead + Send + Unpin, Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn auth_plain(&mut self, username: &str, password: &str) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§