[][src]Struct webmachine_rust::content_negotiation::Encoding

pub struct Encoding {
    pub encoding: String,
    pub weight: f32,
}

Struct to represent an encoding

Fields

encoding: String

Encoding string

weight: f32

Weight associated with the encoding

Implementations

impl Encoding[src]

pub fn parse_string(encoding: &str) -> Encoding[src]

Parse a string into a Charset struct

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

Adds a quality weight to the charset

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

If this encoding matches the other encoding

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

Converts this encoding into a string

Trait Implementations

impl Clone for Encoding[src]

impl Debug for Encoding[src]

impl PartialEq<Encoding> for Encoding[src]

impl StructuralPartialEq for Encoding[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.