Struct typed_headers::QualityItem [−][src]
pub struct QualityItem<T> { pub item: T, pub quality: Quality, }
A value paired with its "quality" as defined in RFC7231.
Quality items are used in content negotiation headers such as Accept
and Accept-Encoding
.
Fields
item: T
quality: Quality
Methods
impl<T> QualityItem<T>
[src]
impl<T> QualityItem<T>
pub fn new(item: T, quality: Quality) -> QualityItem<T>
[src]
pub fn new(item: T, quality: Quality) -> QualityItem<T>
Creates a new quality item.
Trait Implementations
impl<T: Debug> Debug for QualityItem<T>
[src]
impl<T: Debug> Debug for QualityItem<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Clone> Clone for QualityItem<T>
[src]
impl<T: Clone> Clone for QualityItem<T>
fn clone(&self) -> QualityItem<T>
[src]
fn clone(&self) -> QualityItem<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for QualityItem<T>
[src]
impl<T: PartialEq> PartialEq for QualityItem<T>
fn eq(&self, other: &QualityItem<T>) -> bool
[src]
fn eq(&self, other: &QualityItem<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &QualityItem<T>) -> bool
[src]
fn ne(&self, other: &QualityItem<T>) -> bool
This method tests for !=
.
impl<T> Display for QualityItem<T> where
T: Display,
[src]
impl<T> Display for QualityItem<T> where
T: Display,
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> FromStr for QualityItem<T> where
T: FromStr,
[src]
impl<T> FromStr for QualityItem<T> where
T: FromStr,
Auto Trait Implementations
impl<T> Send for QualityItem<T> where
T: Send,
impl<T> Send for QualityItem<T> where
T: Send,
impl<T> Sync for QualityItem<T> where
T: Sync,
impl<T> Sync for QualityItem<T> where
T: Sync,