Trait mail_headers::HeaderTryFrom
source · pub trait HeaderTryFrom<T>: Sized {
fn try_from(val: T) -> Result<Self, ComponentCreationError>;
}
Expand description
Workaround for TryFrom
,TryInto
not being stable.
Required Methods
fn try_from(val: T) -> Result<Self, ComponentCreationError>
Implementors
impl HeaderTryFrom<Option<Email>> for Path
impl HeaderTryFrom<Input> for Email
impl HeaderTryFrom<Input> for Phrase
impl HeaderTryFrom<String> for Input
impl HeaderTryFrom<String> for Email
impl HeaderTryFrom<String> for Phrase
impl HeaderTryFrom<MediaType<MimeSpec<Ascii, Modern>>> for MediaType
impl HeaderTryFrom<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType
impl<'a> HeaderTryFrom<&'a str> for Input
impl<'a> HeaderTryFrom<&'a str> for Disposition
This try from is for usability only, it is generally recommendet to use Disposition::inline()/::attachment() as it is type safe / compiler time checked, while this one isn’t