pub enum PartRole {
Container,
TextBody,
HtmlBody,
CopiedBody,
MediaBody,
Attachment,
Dropped,
}Expand description
How the body classification used a part (issue #107). Every part has exactly one role; the roles of a message’s parts partition them.
The role is a summary of the list memberships
(MessagePart::in_text_body, MessagePart::in_html_body,
MessagePart::is_attachment). PartRole::CopiedBody takes priority
over PartRole::TextBody and PartRole::HtmlBody: a text or HTML
part copied into the other list is in both lists.
Variants§
Container
A multipart; its children have their own roles.
TextBody
A text part of the body lists.
HtmlBody
An HTML part of the body lists.
CopiedBody
A body part of a multipart/alternative that had no version of the
other type, copied into the other body list as its stand-in; it is in
both body lists.
MediaBody
An image, audio or video part displayed in the body lists (it may
also be an attachment; see MessageRef::attachments).
Attachment
A part offered as an attachment and in no body list.
Dropped
A part in no list.