Struct Mime
struct Mime { ... }
A parsed mime or media type.
Implementations
impl Mime
fn type_(self: &Self) -> Name<'_>Get the top level media type for this
Mime.Example
let mime = TEXT_PLAIN; assert_eq!; assert_eq!;fn subtype(self: &Self) -> Name<'_>Get the subtype of this
Mime.Example
let mime = TEXT_PLAIN; assert_eq!; assert_eq!;fn suffix(self: &Self) -> Option<Name<'_>>Get an optional +suffix for this
Mime.Example
let svg = "image/svg+xml"..unwrap; assert_eq!; assert_eq!; assert!;fn get_param<'a, N>(self: &'a Self, attr: N) -> Option<Name<'a>> where N: PartialEq<Name<'a>>Look up a parameter by name.
Example
let mime = TEXT_PLAIN_UTF_8; assert_eq!; assert_eq!; assert!; let mime = "multipart/form-data; boundary=ABCDEFG"..unwrap; assert_eq!;fn params<'a>(self: &'a Self) -> Params<'a>Returns an iterator over the parameters.
fn essence_str(self: &Self) -> &strReturn a
&strof the Mime's "essence".
impl AsRef for Mime
fn as_ref(self: &Self) -> &str
impl Clone for Mime
fn clone(self: &Self) -> Mime
impl Debug for Mime
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Display for Mime
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Eq for Mime
impl Freeze for Mime
impl FromStr for Mime
fn from_str(s: &str) -> Result<Mime, <Self as >::Err>
impl Hash for Mime
fn hash<T: Hasher>(self: &Self, hasher: &mut T)
impl Ord for Mime
fn cmp(self: &Self, other: &Mime) -> Ordering
impl PartialEq for Mime
fn eq(self: &Self, other: &Mime) -> bool
impl PartialOrd for Mime
fn partial_cmp(self: &Self, other: &Mime) -> Option<Ordering>
impl RefUnwindSafe for Mime
impl Send for Mime
impl Sync for Mime
impl Unpin for Mime
impl UnwindSafe for Mime
impl<'a> PartialEq for Mime
fn eq(self: &Self, s: &&'a str) -> bool
impl<T> Any for Mime
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Mime
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Mime
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Mime
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Mime
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Mime
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for Mime
fn to_string(self: &Self) -> String
impl<T, U> Into for Mime
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Mime
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Mime
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>