Skip to main content

protonmail_client/
error.rs

1//! Error types for protonmail-client
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum Error {
7    #[error("IMAP error: {0}")]
8    Imap(String),
9
10    #[error("Email parsing error: {0}")]
11    Parse(String),
12
13    #[error("Configuration error: {0}")]
14    Config(String),
15
16    #[error("IO error: {0}")]
17    Io(#[from] std::io::Error),
18
19    #[error("TLS error: {0}")]
20    Tls(String),
21}
22
23pub type Result<T> = std::result::Result<T, Error>;