[−][src]Struct webmachine_rust::content_negotiation::MediaType
Struct to represent a media type
Fields
main: StringMain type of the media type
sub: StringSub type of the media type
weight: f32Weight associated with the media type
Implementations
impl MediaType[src]
pub fn parse_string(media_type: &str) -> MediaType[src]
Parse a string into a MediaType struct
pub fn with_weight(&self, weight: &String) -> MediaType[src]
Adds a quality weight to the media type
pub fn weight(&self) -> (f32, u8)[src]
Returns a weighting for this media type
pub fn matches(&self, other: &MediaType) -> MediaTypeMatch[src]
If this media type matches the other media type
pub fn to_string(&self) -> String[src]
Converts this media type into a string
Trait Implementations
impl Clone for MediaType[src]
impl Debug for MediaType[src]
impl PartialEq<MediaType> for MediaType[src]
impl StructuralPartialEq for MediaType[src]
Auto Trait Implementations
impl RefUnwindSafe for MediaType[src]
impl Send for MediaType[src]
impl Sync for MediaType[src]
impl Unpin for MediaType[src]
impl UnwindSafe for MediaType[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,