Crate imap_codec
source · [−]Expand description
Features
This crate uses the following features to enable IMAP extensions:
Feature | Description | Enabled by default |
---|---|---|
starttls | See STARTTLS | No |
ext_idle | See IDLE | No (but may change) |
ext_enable | See ENABLE | No (but may change) |
ext_compress | See COMPRESS | No (but may change) |
Features prefixed with “ext_” are IMAP extensions and often require a more elaborate message flow. STARTTLS is not considered an extension but feature-gated because it should be avoided. You should always use IMAPS, i.e., IMAP-over-TLS on port 993, instead of STARTTLS.
Furthermore, imap-codec uses the following features to facilitate interoperability:
Feature | Description | Enabled by default |
---|---|---|
arbitrary | derive(Arbitrary) | No |
nom | pub use internal; | No |
serde | derive(Serialize, Deserialize) | No |
When using “arbitrary”, all types defined in imap-codec implement the Arbitrary trait to ease testing. Although nom is always used for parsing, imap-codec tries to hide nom from the public API. Should you want to reuse a parser from imap-codec, use the “nom” feature to export all parsers. When the “serde” feature is used, all types implement Serde’s Serialize and Deserialize traits.