pub struct MediaType<'a> {
pub mimetype: &'a str,
pub params: &'a str,
}
Expand description
Parses a media type field into its MIME type and parameter components.
Fields§
§mimetype: &'a str
The MIME type should have form type/subtype
for some media type and subtype.
This is guaranteed to be nonempty and free of surrounding whitespace but is not guaranteed to be in the correct syntax. It requires case-insensitive comparison to other strings [RFC7231§3.1.1.1].
params: &'a str
Parameter string for the MIME type.
Implementations§
Trait Implementations§
impl<'a> Copy for MediaType<'a>
impl<'a> Eq for MediaType<'a>
impl<'a> StructuralPartialEq for MediaType<'a>
Auto Trait Implementations§
impl<'a> Freeze for MediaType<'a>
impl<'a> RefUnwindSafe for MediaType<'a>
impl<'a> Send for MediaType<'a>
impl<'a> Sync for MediaType<'a>
impl<'a> Unpin for MediaType<'a>
impl<'a> UnwindSafe for MediaType<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)