A serde_with adapter that serializes BString as a JSON string when
the value is valid UTF-8, falling back to the default byte-array
representation otherwise.
Represents an ordered list of headers.
Note that there may be multiple headers with the same name.
Derefs to the underlying Vec<Header> for mutation,
but provides some accessors for retrieving headers by name.
References the position of a MimePart by encoding the steps in
a tree walking operation. The encoding of PartPointer is a
sequence of integers that identify the index of a child part
by its level within the mime tree, selecting the current node
when no more indices remain. eg: [] indicates the
root part, while [0] is the 0th child of the root.
The parsed, typed value of a header, as distinct from the raw wire form
held by Header. A header’s name determines the grammar its bytes are
parsed with (see ParsedHeader::structured), so callers reach a value
of the correct type without choosing a parser themselves.
Helper for holding either an owned or borrowed string,
and where the slice method is aware of that borrowing,
allowing for efficient copying and slicing without
making extraneous additional copies