Struct webmachine_rust::content_negotiation::MediaType [] [src]

pub struct MediaType {
    pub main: String,
    pub sub: String,
    pub weight: f32,
}

Struct to represent a media type

Fields

Main type of the media type

Sub type of the media type

Weight associated with the media type

Methods

impl MediaType
[src]

Parse a string into a MediaType struct

Adds a quality weight to the media type

Returns a weighting for this media type

If this media type matches the other media type

Converts this media type into a string

Trait Implementations

impl Debug for MediaType
[src]

Formats the value using the given formatter.

impl Clone for MediaType
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for MediaType
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.