Enum vsmtp_protocol::Verb

#[non_exhaustive]
pub enum Verb {
    Helo,
    Ehlo,
    MailFrom,
    RcptTo,
    Data,
    Quit,
    Rset,
    Help,
    Noop,
    StartTls,
    Auth,
    Unknown,
}
Expand description

SMTP Command.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Helo

Used to identify the SMTP client to the SMTP server. (historical)

§

Ehlo

Used to identify the SMTP client to the SMTP server and request smtp extensions.

§

MailFrom

This command is used to initiate a mail transaction in which the mail data is delivered to an SMTP server that may, in turn, deliver it to one or more mailboxes or pass it on to another system (possibly using SMTP).

§

RcptTo

This command is used to identify an individual recipient of the mail data; multiple recipients are specified by multiple uses of this command.

§

Data

This command causes the mail data to be appended to the mail data buffer.

§

Quit

This command specifies that the receiver MUST send a “221 OK” reply, and then close the transmission channel.

§

Rset

This command specifies that the current mail transaction will be aborted. Any stored sender, recipients, and mail data MUST be discarded, and all buffers and state tables cleared.

§

Help

This command causes the server to send helpful information to the client. The command MAY take an argument (e.g., any command name) and return more specific information as a response.

§

Noop

This command does not affect any parameters or previously entered commands.

§

StartTls

See “Transport Layer Security” https://datatracker.ietf.org/doc/html/rfc3207

§

Auth

Authentication with SASL protocol https://datatracker.ietf.org/doc/html/rfc4954

§

Unknown

Any other buffer received while expecting a command is considered an unknown.

Trait Implementations§

§

impl AsRef<str> for Verb

§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Debug for Verb

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl FromStr for Verb

§

type Err = ParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Verb, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl TryFrom<&str> for Verb

§

type Error = ParseError

The type returned in the event of a conversion error.
§

fn try_from(s: &str) -> Result<Verb, <Self as TryFrom<&str>>::Error>

Performs the conversion.
§

impl VariantNames for Verb

§

const VARIANTS: &'static [&'static str] = _

Names of the variants of this enum

Auto Trait Implementations§

§

impl RefUnwindSafe for Verb

§

impl Send for Verb

§

impl Sync for Verb

§

impl Unpin for Verb

§

impl UnwindSafe for Verb

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more