Skip to main content

Crate imap_core

Crate imap_core 

Source
Expand description

Protocol core for the imap-rs library.

imap-rs-core owns the IMAP4rev2 (RFC 9051) response model and a zero-copy, hand-rolled recursive-descent parser. It performs no I/O and has no network dependencies, which keeps it small and trivially testable.

§Layout

§Example

use imap_core::parser::parse_response;

let input = b"* OK IMAP4rev2 Service Ready\r\n";
let (_rest, response) = parse_response(input).expect("valid greeting");

Re-exports§

pub use error::ParseError;
pub use parser::parse_response;
pub use ast::*;

Modules§

ast
Typed IMAP4rev2 response grammar: Response and its constituents. Borrowed AST for IMAP4rev1 / IMAP4rev2 server responses.
error
Parser failure type: ParseError.
parser
Zero-copy response parser: parse_response. Recursive-descent parser for IMAP4rev1 / IMAP4rev2 server responses.