Crate managesieve

Source
Expand description

managesieve - parsing and generation of ‘managesieve’ communications protocol (RFC 5804) commands and responses.

§Usage

Commands can be generated in the correct form by constructing a Command of the desired type, which can then be converted into a string and sent.

Response parsing is achieved by passing bytes received from the managesieve server to the expected response_ function. It will either return data and a Response, Error::IncompleteResponse if more bytes are expected to form a complete response, or Error::InvalidResponse if the server has responded in a nonconforming manner.

It is possible to pipeline multiple managesieve commands, and receive a stream of bytes comprising multiple responses. In this case, response_ functions return the remaining bytes after successfully parsing the first response.

Structs§

Response

Enums§

Capability
Command
Error
OkNoBye
QuotaVariant
ResponseCode

Functions§

response_authenticate
response_capability
Parses text returned from the server in response to the CAPABILITY command. Returns list of capabilities and optional additional strings.
response_checkscript
Parses text returned from the server in response to the CHECKSCRIPT command.
response_deletescript
Parses text returned from the server in response to the DELETESCRIPT command.
response_getscript
Parses text returned from the server in response to the GETSCRIPT command.
response_havespace
Parses text returned from the server in response to the HAVESPACE command.
response_listscripts
Parses text returned from the server in response to the LISTSCRIPTS command. Returns list of scripts and a bool indicating if that script is the active script.
response_logout
Parses text returned from the server in response to the LOGOUT command.
response_noop
Parses text returned from the server in response to the NOOP command.
response_putscript
Parses text returned from the server in response to the PUTSCRIPT command.
response_renamescript
Parses text returned from the server in response to the RENAMESCRIPT command.
response_setactive
Parses text returned from the server in response to the GETSCRIPT command.
response_starttls
Parses text returned from the server in response to the STARTTLS command. Returns list of capabilities and optional additional strings.
response_unauthenticate
Parses text returned from the server in response to the UNAUTHENTICATE command.

Type Aliases§

SieveUrl