pub struct MediaType<'a> { /* private fields */ }Expand description
Borrowed media-type essence used by response policies.
Implementations§
Source§impl<'a> MediaType<'a>
impl<'a> MediaType<'a>
Sourcepub const FORM_URLENCODED: Self
pub const FORM_URLENCODED: Self
application/x-www-form-urlencoded.
Sourcepub fn new(value: &'a str) -> Result<Self, ContentTypeError>
pub fn new(value: &'a str) -> Result<Self, ContentTypeError>
Validates a media-type essence without parameters.
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> UnsafeUnpin 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