[][src]Enum new_tokio_smtp::error::LogicError

pub enum LogicError {
    Code(Response),
    UnexpectedCode(Response),
    Custom(Box<dyn Error + Send + Sync + 'static>),
    MissingCapabilities(MissingCapabilities),
}

An error representing that a command was successfully send and the response was successfully received but the response code indicated an error.

This is also used if the Connection detects that a command is not available before it was sent, e.g. EHLO doesn't contain STARTTLS and you send STARTTLS. In such a case no command was send to the server, saving one round trip which would fail anyway.

Variants

Code(Response)

The server replied with a error response code

UnexpectedCode(Response)

The server replied with a non-error response code, but the command could not handle it

For example on DATA the server responds with the intermediate code 354, if the client now receives e.g. a 240 than clearly something went wrong.

Custom(Box<dyn Error + Send + Sync + 'static>)

a custom error code

This is meant to be produced by a custom command, as the sender of the command knows (at some abstraction level) which command it send, it can downcast and handle the error

MissingCapabilities(MissingCapabilities)

command can not be used, as the server does not promotes the necessary capabilities

Trait Implementations

impl Debug for LogicError[src]

impl Display for LogicError[src]

impl Error for LogicError[src]

impl From<LogicError> for GeneralError[src]

impl From<MissingCapabilities> for LogicError[src]

Auto Trait Implementations

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> From<T> for T[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.