Struct vsmtp_server::Handler

pub struct Handler<M: OnMail> { /* private fields */ }
Expand description

Implementations§

Trait Implementations§

Create an instance capable to handle the SASL handshake.
Called when the client connects to the server.
§

fn on_post_tls_handshake<'life0, 'async_trait>(
    &'life0 mut self,
    sni: Option<String>,
    protocol_version: ProtocolVersion,
    cipher_suite: CipherSuite,
    peer_certificates: Option<Vec<Certificate>>,
    alpn_protocol: Option<Vec<u8>>
) -> Pin<Box<dyn Future<Output = Reply> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

Called after a successful TLS handshake.
Called after receiving a Verb::StartTls command.
Called after receiving a Verb::Auth command.
§

fn on_post_auth<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    ctx: &'life1 mut ReceiverContext,
    result: Result<(), AuthError>
) -> Pin<Box<dyn Future<Output = Reply> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,

Called after a successful SASL handshake.
Called after receiving a Verb::Helo command.
Called after receiving a Verb::Ehlo command.
Called after receiving a Verb::MailFrom command.
Called after receiving a Verb::RcptTo command.
Called after receiving a Verb::Rset command.
Called after receiving a Verb::Data command. The stream is the body of the message, with dot-stuffing handled. The stream return None when the message is finished (.<CRLF>).
Called when the number of reply considered as error reached a threshold (hard).
Called when the number of reply considered as error reached a threshold (soft).
The Receiver does not store the context. This function is called after each command to get the context stage.
Called after receiving a Verb::Data command.
Called after receiving a Verb::Quit command.
Called after receiving a Verb::Noop command.
Called after receiving a Verb::Help command.
Called after receiving an unknown command (unrecognized or unimplemented).
Called when the stage of the transaction (obtained with get_stage) and the command are not compatible.
Called when an argument of a command is invalid.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more