[−][src]Struct mail_core::Metadata
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: ContentId
The content id associated with the data.
Methods from Deref<Target = FileMeta>
pub fn replace_empty_fields_with(&mut self, other_meta: &FileMeta)
[src]
Replaces all fields which are None
with the value of the field in other_meta
.
Trait Implementations
impl Clone for Metadata
[src]
fn clone(&self) -> Metadata
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl DerefMut for Metadata
[src]
impl Debug for Metadata
[src]
impl Deref for Metadata
[src]
impl Serialize for Metadata
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Metadata
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<F, T> HeaderTryInto for F where
T: HeaderTryFrom<F>,
[src]
T: HeaderTryFrom<F>,