Struct webmachine_rust::content_negotiation::MediaLanguage
[−]
[src]
pub struct MediaLanguage {
pub main: String,
pub sub: String,
pub weight: f32,
}Struct to represent a media language
Fields
main: String
Main type of the media language
sub: String
Sub type of the media language
weight: f32
Weight associated with the media language
Methods
impl MediaLanguage[src]
fn parse_string(language: &String) -> MediaLanguage
Parse a string into a MediaLanguage struct
fn with_weight(&self, weight: &String) -> MediaLanguage
Adds a quality weight to the media language
fn matches(&self, other: &MediaLanguage) -> bool
If this media language matches the other media language
fn to_string(&self) -> String
Converts this media language into a string
Trait Implementations
impl Debug for MediaLanguage[src]
impl Clone for MediaLanguage[src]
fn clone(&self) -> MediaLanguage
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl PartialEq for MediaLanguage[src]
fn eq(&self, __arg_0: &MediaLanguage) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &MediaLanguage) -> bool
This method tests for !=.