[−][src]Struct mail_headers::header_components::MediaType
Methods
impl MediaType[src]
pub fn parse(media_type: &str) -> Result<Self, ComponentCreationError>[src]
pub fn new<T, ST>(type_: T, subtype: ST) -> Result<Self, ComponentCreationError> where
T: AsRef<str>,
ST: AsRef<str>, [src]
T: AsRef<str>,
ST: AsRef<str>,
pub fn new_with_params<T, ST, I, IV, IN>(
type_: T,
subtype: ST,
params: I
) -> Result<Self, ComponentCreationError> where
T: AsRef<str>,
ST: AsRef<str>,
I: IntoIterator<Item = (IV, IN)>,
IV: AsRef<str>,
IN: AsRef<str>, [src]
type_: T,
subtype: ST,
params: I
) -> Result<Self, ComponentCreationError> where
T: AsRef<str>,
ST: AsRef<str>,
I: IntoIterator<Item = (IV, IN)>,
IV: AsRef<str>,
IN: 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>,
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) -> &Self::Target[src]
impl EncodableInHeader for MediaType[src]
fn encode(&self, handle: &mut EncodingWriter) -> Result<(), EncodingError>[src]
fn boxed_clone(&self) -> Box<dyn EncodableInHeader>[src]
impl From<MediaType<MimeSpec<Ascii, Modern>>> for MediaType[src]
impl From<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType[src]
fn from(media_type: _MediaType<MimeSpec<Internationalized, Modern>>) -> Self[src]
impl FromStr for MediaType[src]
type Err = ComponentCreationError
The associated error which can be returned from parsing.
fn from_str(inp: &str) -> Result<Self, Self::Err>[src]
impl<'a> HeaderTryFrom<&'a str> for MediaType[src]
fn try_from(media_type: &'a str) -> Result<Self, ComponentCreationError>[src]
impl HeaderTryFrom<MediaType<MimeSpec<Ascii, Modern>>> for MediaType[src]
fn try_from(
mime: _MediaType<MimeSpec<Ascii, Modern>>
) -> Result<Self, ComponentCreationError>[src]
mime: _MediaType<MimeSpec<Ascii, Modern>>
) -> Result<Self, ComponentCreationError>
impl HeaderTryFrom<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType[src]
fn try_from(
mime: _MediaType<MimeSpec<Internationalized, Modern>>
) -> Result<Self, ComponentCreationError>[src]
mime: _MediaType<MimeSpec<Internationalized, Modern>>
) -> Result<Self, ComponentCreationError>
impl Into<AnyMediaType> for MediaType[src]
fn into(self) -> AnyMediaType[src]
impl Into<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType[src]
fn into(self) -> _MediaType<MimeSpec<Internationalized, Modern>>[src]
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> Erased for T[src]
impl<T> From<T> for T[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>,