pub trait HeaderTryFrom<T>: Sized {
// Required method
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
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