[][src]Struct webmachine_rust::content_negotiation::Charset

pub struct Charset {
    pub charset: String,
    pub weight: f32,
}

Struct to represent a character set

Fields

charset: String

Charset code

weight: f32

Weight associated with the charset

Implementations

impl Charset[src]

pub fn parse_string(charset: &str) -> Charset[src]

Parse a string into a Charset struct

pub fn with_weight(&self, weight: &str) -> Charset[src]

Adds a quality weight to the charset

pub fn matches(&self, other: &Charset) -> bool[src]

If this media charset matches the other media charset

pub fn to_string(&self) -> String[src]

Converts this charset into a string

Trait Implementations

impl Clone for Charset[src]

impl Debug for Charset[src]

impl PartialEq<Charset> for Charset[src]

impl StructuralPartialEq for Charset[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.