Struct http_types::content::MediaTypeProposal
source · 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<MediaTypeProposal> for MediaTypeProposal
impl PartialEq<MediaTypeProposal> for MediaTypeProposal
source§fn eq(&self, other: &MediaTypeProposal) -> bool
fn eq(&self, other: &MediaTypeProposal) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<Mime> for &MediaTypeProposal
impl PartialEq<Mime> for &MediaTypeProposal
source§impl PartialEq<Mime> for MediaTypeProposal
impl PartialEq<Mime> for MediaTypeProposal
source§impl PartialOrd<MediaTypeProposal> for MediaTypeProposal
impl PartialOrd<MediaTypeProposal> for MediaTypeProposal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl StructuralPartialEq for MediaTypeProposal
Auto Trait Implementations§
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