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
ast— the typed response grammar (Response,Status, data responses, andFETCHattributes).parser—parse_response, which turns a byte slice into aResponse, borrowing from the input where possible.error—ParseError, the failure type returned by the parser.
§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:
Responseand 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.