protonmail_client/lib.rs
1//! Proton Mail IMAP client library
2//!
3//! An interface to interact with Proton Mail using
4//! [Proton Bridge](https://proton.me/mail/bridge). Connects over
5//! STARTTLS with self-signed certificate support.
6//!
7//! ## Access control
8//!
9//! `ProtonClient` uses a typestate pattern to separate read and write
10//! operations at compile time:
11//!
12//! - `ProtonClient<ReadOnly>` -- list, fetch, search (default)
13//! - `ProtonClient<ReadWrite>` -- all of the above **plus** move,
14//! flag, archive, and unmark
15//!
16//! Returns parsed [`Email`] structs from the [`email_extract`] crate.
17
18mod client;
19mod config;
20mod connection;
21mod error;
22mod flag;
23mod folder;
24
25pub use client::{ProtonClient, ReadOnly, ReadWrite};
26pub use config::ImapConfig;
27pub use email_extract::Email;
28pub use error::{Error, Result};
29pub use flag::Flag;
30pub use folder::Folder;