Skip to main content

SmtpCoroutine

Trait SmtpCoroutine 

Source
pub trait SmtpCoroutine {
    type Yield;
    type Return;

    // Required method
    fn resume(
        &mut self,
        arg: Option<&[u8]>,
    ) -> SmtpCoroutineState<Self::Yield, Self::Return>;
}
Expand description

Standard-shape SMTP coroutine.

Required Associated Types§

Source

type Yield

Per-step value.

Source

type Return

Terminal value; by convention Result<Output, Error>.

Required Methods§

Source

fn resume( &mut self, arg: Option<&[u8]>, ) -> SmtpCoroutineState<Self::Yield, Self::Return>

Advances the coroutine one step. Pass None for the initial call or after a SmtpYield::WantsWrite; Some(data) after a SmtpYield::WantsRead; Some(&[]) to signal EOF.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SmtpCoroutine for SmtpAuthAnonymous

Source§

impl SmtpCoroutine for SmtpAuthLogin

Source§

impl SmtpCoroutine for SmtpAuthOauthbearer

Source§

impl SmtpCoroutine for SmtpAuthPlain

Source§

impl SmtpCoroutine for SmtpAuthScramSha256

Available on crate feature scram only.
Source§

impl SmtpCoroutine for SmtpAuthXoauth2

Source§

impl SmtpCoroutine for SmtpData

Source§

impl SmtpCoroutine for SmtpEhlo

Source§

impl SmtpCoroutine for SmtpGreetingGet

Source§

impl SmtpCoroutine for SmtpHelo

Source§

impl SmtpCoroutine for SmtpMail

Source§

impl SmtpCoroutine for SmtpMessageSend

Source§

impl SmtpCoroutine for SmtpNoop

Source§

impl SmtpCoroutine for SmtpQuit

Source§

impl SmtpCoroutine for SmtpRaw

Source§

impl SmtpCoroutine for SmtpRcpt

Source§

impl SmtpCoroutine for SmtpRset

Source§

impl SmtpCoroutine for SmtpStartTls

Source§

impl<Cmd> SmtpCoroutine for SmtpCommandSend<Cmd>