pub struct Metadata {
pub file_meta: FileMeta,
pub media_type: MediaType,
pub content_id: MessageId,
}
Expand description
POD type containing FileMeta, Content-Type and Content-Id
The file meta contains optional information like file name and read as well as last modification data.
The media type will be used for the content type header which is used to determine how a mail client will handle the file. It is also used to get a hint on how to best transfer encode the file.
The content id is used to identify the “data” and refer to it from some other place. For example in a mail the html body could refer to a image contained in the mail to embed it in the mail.
As Content-Id’s are supposed to be world unique they could also be used for some caching and similar but that plays hardly any role any more, except maybe for “external” mail bodies.
Fields§
§file_meta: FileMeta
File meta like file name or file read time.
media_type: MediaType
The media type of the data.
content_id: MessageId
The content id associated with the data.
Methods from Deref<Target = FileMeta>§
sourcepub fn replace_empty_fields_with(&mut self, other_meta: &FileMeta)
pub fn replace_empty_fields_with(&mut self, other_meta: &FileMeta)
Replaces all fields which are None
with the value of the field in other_meta
.