[−][src]Struct mail::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: MessageId
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]
impl Debug for Metadata
[src]
impl Deref for Metadata
[src]
type Target = FileMeta
The resulting type after dereferencing.
fn deref(&self) -> &<Metadata as Deref>::Target
[src]
impl DerefMut for Metadata
[src]
impl<'de> Deserialize<'de> for Metadata
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<Metadata, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Metadata, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Serialize for Metadata
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Auto Trait Implementations
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> HeaderTryFrom<T> for T
[src]
fn try_from(val: T) -> Result<T, ComponentCreationError>
[src]
impl<F, T> HeaderTryInto<T> for F where
T: HeaderTryFrom<F>,
[src]
T: HeaderTryFrom<F>,
fn try_into(self) -> Result<T, ComponentCreationError>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,