pub struct MediaTypeProposal { /* private fields */ }
Expand description
A proposed Media Type for the Accept
header.
Implementations§
Methods from Deref<Target = Mime>§
Sourcepub fn basetype(&self) -> &str
pub fn basetype(&self) -> &str
Access the Mime’s type
value.
According to the spec this method should be named type
, but that’s a reserved keyword in
Rust so hence prefix with base
instead.
Sourcepub fn param(&self, name: impl Into<ParamName>) -> Option<&ParamValue>
pub fn param(&self, name: impl Into<ParamName>) -> Option<&ParamValue>
Get a reference to a param.
Sourcepub fn remove_param(&mut self, name: impl Into<ParamName>) -> Option<ParamValue>
pub fn remove_param(&mut self, name: impl Into<ParamName>) -> Option<ParamValue>
Remove a param from the set. Returns the ParamValue
if it was contained within the set.
Trait Implementations§
Source§impl Clone for MediaTypeProposal
impl Clone for MediaTypeProposal
Source§fn clone(&self) -> MediaTypeProposal
fn clone(&self) -> MediaTypeProposal
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MediaTypeProposal
impl Debug for MediaTypeProposal
Source§impl Deref for MediaTypeProposal
impl Deref for MediaTypeProposal
Source§impl DerefMut for MediaTypeProposal
impl DerefMut for MediaTypeProposal
Source§impl From<MediaTypeProposal> for HeaderValue
impl From<MediaTypeProposal> for HeaderValue
Source§fn from(entry: MediaTypeProposal) -> HeaderValue
fn from(entry: MediaTypeProposal) -> HeaderValue
Converts to this type from the input type.
Source§impl From<MediaTypeProposal> for Mime
impl From<MediaTypeProposal> for Mime
Source§fn from(accept: MediaTypeProposal) -> Self
fn from(accept: MediaTypeProposal) -> Self
Converts to this type from the input type.
Source§impl From<Mime> for MediaTypeProposal
impl From<Mime> for MediaTypeProposal
Source§impl PartialEq<Mime> for &MediaTypeProposal
impl PartialEq<Mime> for &MediaTypeProposal
Source§impl PartialEq<Mime> for MediaTypeProposal
impl PartialEq<Mime> for MediaTypeProposal
Source§impl PartialEq for MediaTypeProposal
impl PartialEq for MediaTypeProposal
Source§impl PartialOrd for MediaTypeProposal
impl PartialOrd for MediaTypeProposal
impl StructuralPartialEq for MediaTypeProposal
Auto Trait Implementations§
impl Freeze for MediaTypeProposal
impl RefUnwindSafe for MediaTypeProposal
impl Send for MediaTypeProposal
impl Sync for MediaTypeProposal
impl Unpin for MediaTypeProposal
impl UnwindSafe for MediaTypeProposal
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