Module decode

Source
Expand description

§Decoding of messages.

You can use Decoders to parse messages.

IMAP literals make separating the parsing logic from the application logic difficult. When a server recognizes a literal (e.g. {42}\r\n) in a command, it first needs to agree to receive more data by sending a so-called “command continuation request” (+ ...). Without a command continuation request, a client won’t send more data, and the command parser on the server would always return LiteralFound { length: 42, .. }. This makes real-world decoding of IMAP more elaborate.

Have a look at the parse_command example to see how a real-world application could decode IMAP.

Enums§

AuthenticateDataDecodeError
Error during authenticate data line decoding.
CommandDecodeError
Error during command decoding.
GreetingDecodeError
Error during greeting decoding.
IdleDoneDecodeError
Error during idle done decoding.
ResponseDecodeError
Error during response decoding.

Traits§

Decoder
Decoder.