[][src]Struct mail_headers::header_components::MediaType

pub struct MediaType { /* fields omitted */ }

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]

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]

pub fn remove_param<N>(&mut self, name: N) -> bool where
    N: for<'a> PartialEq<Name<'a>>, 
[src]

pub fn set_param<N, V>(&mut self, name: N, value: V) where
    N: AsRef<str>,
    V: AsRef<str>, 
[src]

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.

impl EncodableInHeader for MediaType[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.

impl<'a> HeaderTryFrom<&'a str> for MediaType[src]

impl HeaderTryFrom<MediaType<MimeSpec<Ascii, Modern>>> for MediaType[src]

impl HeaderTryFrom<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType[src]

impl Into<AnyMediaType> for MediaType[src]

impl Into<MediaType<MimeSpec<Internationalized, Modern>>> for MediaType[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.