[−][src]Struct mail_core::Source
POD containing the IRI which should be used to laod a resource well as an optional file name to use and a description about how the content type should be handled.
Fields
iri: IRI
A International Resource Identifier pointing to a source
from which the Resource can be loaded. Note that the interpretation
of the IRI is left to the ResourceLoader
implementation of the
context. The ResourceLoader
can decide to reject valid IRI's e.g.
a (non local) http url is likely to be rejected by any implementation.
use_media_type: UseMediaType
Allows specifying how the media type detection is done.
use_file_name: Option<String>
Allows providing a explicit name overriding any inferred name.
If a resource if loaded from a IRI it potentially can contain
a inferred name e.g. for loading a file secret_thing.png
it
would be just that file name, but you potentially want to provide
a name which differs from the name the file has in the file system
in which case you can provide a name here.
Note that file names are optional and don't need to be provided at all. But it is strongly recommended to provide them for anything used as attachment but normally irrelevant for anything else.
Trait Implementations
impl Clone for Source
[src]
fn clone(&self) -> Source
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Source
[src]
impl Serialize for Source
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Source
[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> 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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>,