Enum smtp_codec::types::Command[][src]

pub enum Command {
    Ehlo {
        fqdn_or_address_literal: Vec<u8>,
    },
    Helo {
        fqdn_or_address_literal: Vec<u8>,
    },
    Mail {
        reverse_path: Vec<u8>,
        parameters: Option<Vec<u8>>,
    },
    Rcpt {
        forward_path: Vec<u8>,
        parameters: Option<Vec<u8>>,
    },
    Data,
    Rset,
    Vrfy {
        user_or_mailbox: Vec<u8>,
    },
    Expn {
        mailing_list: Vec<u8>,
    },
    Help {
        argument: Option<Vec<u8>>,
    },
    Noop {
        argument: Option<Vec<u8>>,
    },
    Quit,
    StartTLS,
    AuthLogin(Option<String>),
    AuthPlain(Option<String>),
}

Variants

Ehlo

Fields of Ehlo

fqdn_or_address_literal: Vec<u8>
Helo

Fields of Helo

fqdn_or_address_literal: Vec<u8>
Mail

Fields of Mail

reverse_path: Vec<u8>parameters: Option<Vec<u8>>
Rcpt

Fields of Rcpt

forward_path: Vec<u8>parameters: Option<Vec<u8>>
Data
Rset
Vrfy

This command asks the receiver to confirm that the argument identifies a user or mailbox. If it is a user name, information is returned as specified in Section 3.5.

This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer.

Fields of Vrfy

user_or_mailbox: Vec<u8>
Expn

This command asks the receiver to confirm that the argument identifies a mailing list, and if so, to return the membership of that list. If the command is successful, a reply is returned containing information as described in Section 3.5. This reply will have multiple lines except in the trivial case of a one-member list.

This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer, and it may be issued at any time.

Fields of Expn

mailing_list: Vec<u8>
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.

SMTP servers SHOULD support HELP without arguments and MAY support it with arguments.

This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer, and it may be issued at any time.

Fields of Help

argument: Option<Vec<u8>>
Noop

This command does not affect any parameters or previously entered commands. It specifies no action other than that the receiver send a "250 OK" reply.

If a parameter string is specified, servers SHOULD ignore it.

This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer, and it may be issued at any time.

Fields of Noop

argument: Option<Vec<u8>>
Quit

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

The receiver MUST NOT intentionally close the transmission channel until it receives and replies to a QUIT command (even if there was an error). The sender MUST NOT intentionally close the transmission channel until it sends a QUIT command, and it SHOULD wait until it receives the reply (even if there was an error response to a previous command). If the connection is closed prematurely due to violations of the above or system or network failure, the server MUST cancel any pending transaction, but not undo any previously completed transaction, and generally MUST act as if the command or transaction in progress had received a temporary error (i.e., a 4yz response).

The QUIT command may be issued at any time. Any current uncompleted mail transaction will be aborted.

StartTLS
AuthLogin(Option<String>)
AuthPlain(Option<String>)

Implementations

impl Command[src]

pub fn name(&self) -> &'static str[src]

impl Command[src]

pub fn serialize(&self, writer: &mut impl Write) -> Result<()>[src]

Trait Implementations

impl Clone for Command[src]

impl Debug for Command[src]

impl Eq for Command[src]

impl PartialEq<Command> for Command[src]

impl StructuralEq for Command[src]

impl StructuralPartialEq for Command[src]

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.