imap-rs-core
Zero-copy IMAP4rev2 protocol types and parser for the imap-rs library.
This is the core layer of the hexagonal imap-rs workspace: it owns the
protocol AST and a hand-rolled recursive-descent parser. It performs no I/O
and has no network dependencies, which keeps it trivially testable and reusable.
Features
- Zero-copy parsing — borrows
&[u8]slices from the network buffer to avoid allocations. - Typed protocol AST covering IMAP4rev2 (RFC 9051) responses.
- Explicit error handling via
thiserror(Incomplete,Malformed, invalid UTF-8).
Usage
[]
= "0.2"
use parse_response;
let input = b"* OK IMAP4rev2 Service Ready\r\n";
let = parse_response.expect;
Most users should depend on the umbrella
imap-rscrate, which re-exports this crate asimap_rs::core.
License
MIT