Struct ajars_surf::surf::http::content::MediaTypeProposal
[−]pub struct MediaTypeProposal { /* private fields */ }
Expand description
A proposed Media Type for the Accept
header.
Implementations
impl MediaTypeProposal
impl MediaTypeProposal
Methods from Deref<Target = Mime>
pub 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.
pub 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.
pub 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
impl Clone for MediaTypeProposal
impl Clone for MediaTypeProposal
fn clone(&self) -> MediaTypeProposal
fn clone(&self) -> MediaTypeProposal
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for MediaTypeProposal
impl Debug for MediaTypeProposal
impl Deref for MediaTypeProposal
impl Deref for MediaTypeProposal
impl DerefMut for MediaTypeProposal
impl DerefMut for MediaTypeProposal
fn deref_mut(&mut self) -> &mut <MediaTypeProposal as Deref>::Target
fn deref_mut(&mut self) -> &mut <MediaTypeProposal as Deref>::Target
Mutably dereferences the value.
impl From<MediaTypeProposal> for Mime
impl From<MediaTypeProposal> for Mime
fn from(accept: MediaTypeProposal) -> Mime
fn from(accept: MediaTypeProposal) -> Mime
Converts to this type from the input type.
impl From<MediaTypeProposal> for HeaderValue
impl From<MediaTypeProposal> for HeaderValue
fn from(entry: MediaTypeProposal) -> HeaderValue
fn from(entry: MediaTypeProposal) -> HeaderValue
Converts to this type from the input type.
impl From<Mime> for MediaTypeProposal
impl From<Mime> for MediaTypeProposal
fn from(media_type: Mime) -> MediaTypeProposal
fn from(media_type: Mime) -> MediaTypeProposal
Converts to this type from the input type.
impl PartialEq<MediaTypeProposal> for MediaTypeProposal
impl PartialEq<MediaTypeProposal> for MediaTypeProposal
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 ==
. Read more
fn ne(&self, other: &MediaTypeProposal) -> bool
fn ne(&self, other: &MediaTypeProposal) -> bool
This method tests for !=
.
impl<'_> PartialEq<Mime> for &'_ MediaTypeProposal
impl<'_> PartialEq<Mime> for &'_ MediaTypeProposal
impl PartialEq<Mime> for MediaTypeProposal
impl PartialEq<Mime> for MediaTypeProposal
impl PartialOrd<MediaTypeProposal> for MediaTypeProposal
impl PartialOrd<MediaTypeProposal> for MediaTypeProposal
fn partial_cmp(&self, other: &MediaTypeProposal) -> Option<Ordering>
fn partial_cmp(&self, other: &MediaTypeProposal) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more