This library provides types, i.e., struct
s and enum
s, for the [IMAP4rev1] protocol.
Rust's type system is used to enforce correctness and make the library misuse-resistant.
It must not be possible to construct messages that violate the IMAP specification.
Fuzzing (via [cargo fuzz]) and property-based tests are used to uncover bugs. For example, the library is fuzz-tested never to produce an invalid message. Testing is currently done in [imap-codec] -- the parent library from which imap-types was initially extracted.
Due to the correctness guarantees, imap-types uses multiple ["string types"] like Atom
, Tag
, NString
, and IString
.
These types should not play an essential role for library consumers.
However, it can make sense to expose some of them.
This crate is dual-licensed under Apache 2.0 and MIT terms.