[−][src]Struct mail::header_components::MediaType
Implementations
impl MediaType
[src]
pub fn parse(media_type: &str) -> Result<MediaType, ComponentCreationError>
[src]
pub fn new<T, ST>(
type_: T,
subtype: ST
) -> Result<MediaType, ComponentCreationError> where
ST: AsRef<str>,
T: AsRef<str>,
[src]
type_: T,
subtype: ST
) -> Result<MediaType, ComponentCreationError> where
ST: AsRef<str>,
T: AsRef<str>,
pub fn new_with_params<T, ST, I, IV, IN>(
type_: T,
subtype: ST,
params: I
) -> Result<MediaType, ComponentCreationError> where
I: IntoIterator<Item = (IV, IN)>,
IN: AsRef<str>,
IV: AsRef<str>,
ST: AsRef<str>,
T: AsRef<str>,
[src]
type_: T,
subtype: ST,
params: I
) -> Result<MediaType, ComponentCreationError> where
I: IntoIterator<Item = (IV, IN)>,
IN: AsRef<str>,
IV: AsRef<str>,
ST: AsRef<str>,
T: AsRef<str>,
pub fn remove_param<N>(&mut self, name: N) -> bool where
N: for<'a> PartialEq<Name<'a>>,
[src]
N: for<'a> PartialEq<Name<'a>>,
pub fn set_param<N, V>(&mut self, name: N, value: V) where
N: AsRef<str>,
V: AsRef<str>,
[src]
N: AsRef<str>,
V: AsRef<str>,
Methods from Deref<Target = AnyMediaType>
pub fn type_(&self) -> Name
pub fn subtype(&self) -> Name
pub fn full_type(&self) -> Name
pub fn get_param<'a, N>(&'a self, attr: N) -> Option<Value<'a>> where
N: PartialEq<Name<'a>>,
N: PartialEq<Name<'a>>,
pub fn params(&self) -> Params
pub fn as_str_repr(&self) -> &str
pub fn has_utf8_charset(&self) -> bool
pub fn is_multipart(&self) -> bool
Trait Implementations
impl Clone for MediaType
[src]
impl Debug for MediaType
[src]
impl Deref for MediaType
[src]
type Target = AnyMediaType
The resulting type after dereferencing.
fn deref(&self) -> &<MediaType as Deref>::Target
[src]
impl<'de> Deserialize<'de> for MediaType
[src]
fn deserialize<D>(
deserializer: D
) -> Result<MediaType, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<MediaType, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl EncodableInHeader for MediaType
[src]
fn encode(&self, handle: &mut EncodingWriter) -> Result<(), EncodingError>
[src]
fn boxed_clone(&self) -> Box<dyn EncodableInHeader + 'static>
[src]
impl From<MediaType<MimeSpec<Ascii, Modern>>> for MediaType
[src]
impl From<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType
[src]
impl FromStr for MediaType
[src]
type Err = ComponentCreationError
The associated error which can be returned from parsing.
fn from_str(inp: &str) -> Result<MediaType, <MediaType as FromStr>::Err>
[src]
impl<'a> HeaderTryFrom<&'a str> for MediaType
[src]
impl HeaderTryFrom<MediaType<MimeSpec<Ascii, Modern>>> for MediaType
[src]
fn try_from(
mime: MediaType<MimeSpec<Ascii, Modern>>
) -> Result<MediaType, ComponentCreationError>
[src]
mime: MediaType<MimeSpec<Ascii, Modern>>
) -> Result<MediaType, ComponentCreationError>
impl HeaderTryFrom<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType
[src]
fn try_from(
mime: MediaType<MimeSpec<Internationalized, Modern>>
) -> Result<MediaType, ComponentCreationError>
[src]
mime: MediaType<MimeSpec<Internationalized, Modern>>
) -> Result<MediaType, ComponentCreationError>
impl Into<AnyMediaType> for MediaType
[src]
impl Into<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType
[src]
impl Serialize for MediaType
[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 MediaType
impl Send for MediaType
impl Sync for MediaType
impl Unpin for MediaType
impl UnwindSafe for MediaType
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>,