Expand description
This module provides the encoding buffer.
The encoding buffer is the buffer header implementations write there data to. It provides a view special aspects to make it more robust.
For example it handles the writing of trailing newlines for headers (if they don’t do it) and it fails if you write utf-8 data (in the header) to an buffer which knows that the used mail type doesn’t support it.
There is also a special tracing
(cargo) feature which
will make it’s usage slower, but which will keep track of
what data was inserted in which way making debugging and
writing tests easier. (Through it should only be enabled
for testing and maybe debugging in some cases).
Structs§
- Encode
Closure - A wrapper for an closure making it implement
EncodableInHeader
. - Encode
Fn - A wrapper for an function making it implement
EncodableInHeader
. - Encoding
Buffer - EncodingBuffer for a Mail providing a buffer for encodable traits.
- Encoding
Writer - A handle providing method to write to the underlying buffer keeping track of newlines the current line length and places where the line can be broken so that the soft line length limit (78) and the hard length limit (998) can be kept.
Enums§
Constants§
- LINE_
LEN_ HARD_ LIMIT - as specified in RFC 5322 (mail) + RFC 5321 (smtp) not including CRLF
- LINE_
LEN_ SOFT_ LIMIT - as specified in RFC 5322 not including CRLF
- NEWLINE
- NEWLINE_
WITH_ SPACE
Traits§
- Encodable
InHeader - Trait Implemented by “components” used in header field bodies
- Encodable
InHeader BoxExt