Misuse-resistant Types for the IMAP Protocol

This library provides types, i.e., structs and enums, 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.

Testing

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.

Used String Types

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.

License

This crate is dual-licensed under Apache 2.0 and MIT terms.