Enum imap::error::Error

source ·
#[non_exhaustive]
pub enum Error {
    Io(IoError),
    TlsHandshake(TlsHandshakeError<TcpStream>),
    Tls(TlsError),
    Bad(Bad),
    No(No),
    Bye(Bye),
    ConnectionLost,
    Parse(ParseError),
    Validate(ValidateError),
    Append,
    Unexpected(Response<'static>),
    MissingStatusResponse,
}
Expand description

A set of errors that can occur in the IMAP client

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.
§

Io(IoError)

An io::Error that occurred while trying to read or write to a network stream.

§

TlsHandshake(TlsHandshakeError<TcpStream>)

An error from the native_tls library during the TLS handshake.

§

Tls(TlsError)

An error from the native_tls library while managing the socket.

§

Bad(Bad)

A BAD response from the IMAP server.

§

No(No)

A NO response from the IMAP server.

§

Bye(Bye)

A BYE response from the IMAP server.

§

ConnectionLost

The connection was terminated unexpectedly.

§

Parse(ParseError)

Error parsing a server response.

§

Validate(ValidateError)

Command inputs were not valid IMAP strings.

§

Append

Error appending an e-mail.

§

Unexpected(Response<'static>)

An unexpected response was received. This could be a response from a command, or an unsolicited response that could not be converted into a local type in UnsolicitedResponse.

§

MissingStatusResponse

In response to a STATUS command, the server sent OK without actually sending any STATUS responses first.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

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.

Calls U::from(self).

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
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.