[−][src]Struct mail_headers::header_components::FileMeta
A struct representing common file metadata.
This is used by e.g. attachments, when attaching a file (or embedding an image). Through it's usage is optional.
Stability Note
This is likely to move to an different place at
some point, potentially in a different mail-*
crate.
Fields
file_name: Option<String>
The file name.
Note that this utility is limited to utf-8 file names. This is normally used when downloading a attachment to choose the default file name.
creation_date: Option<DateTime<Utc>>
The creation date of the file (in utc).
modification_date: Option<DateTime<Utc>>
The last modification date of the file (in utc).
read_date: Option<DateTime<Utc>>
The date time the file was read, i.e. placed in the mail (in utc).
size: Option<usize>
The size the file should have.
Note that normally mail explicitly opts to NOT specify the size of a mime-multi part body (e.g. an attachments) and you can never rely on it to e.g. skip ahead. But it has some uses wrt. thinks like external headers.
Methods
impl FileMeta
[src]
pub fn replace_empty_fields_with(&mut self, other_meta: &Self)
[src]
Replaces all fields which are None
with the value of the field in other_meta
.
Trait Implementations
impl PartialEq<FileMeta> for FileMeta
[src]
impl Default for FileMeta
[src]
impl Clone for FileMeta
[src]
fn clone(&self) -> FileMeta
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for FileMeta
[src]
impl Debug for FileMeta
[src]
impl Hash for FileMeta
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Serialize for FileMeta
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for FileMeta
[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> Erased for T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,