Enum async_imap::error::Error
source · #[non_exhaustive]
pub enum Error {
Io(IoError),
Bad(String),
No(String),
ConnectionLost,
Parse(ParseError),
Validate(ValidateError),
Append,
}
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.
Bad(String)
A BAD response from the IMAP server.
No(String)
A NO 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.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ValidateError> for Error
impl From<ValidateError> for Error
source§fn from(source: ValidateError) -> Self
fn from(source: ValidateError) -> Self
Converts to this type from the input type.