#[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
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.