Struct rocket_http::hyper::header::QualityItem [−][src]
pub struct QualityItem<T> {
pub item: T,
pub quality: Quality,
}Expand description
Represents an item with a quality value as defined in RFC7231.
Fields
item: TThe actual contents of the field.
quality: QualityThe quality (client or server preference) for the value.
Implementations
impl<T> QualityItem<T>[src]
impl<T> QualityItem<T>[src]pub fn new(item: T, quality: Quality) -> QualityItem<T>[src]
pub fn new(item: T, quality: Quality) -> QualityItem<T>[src]Creates a new QualityItem from an item and a quality.
The item can be of any type.
The quality should be a value in the range [0, 1].
Trait Implementations
impl<T> Clone for QualityItem<T> where
T: Clone, [src]
impl<T> Clone for QualityItem<T> where
T: Clone, [src]pub fn clone(&self) -> QualityItem<T>[src]
pub fn clone(&self) -> QualityItem<T>[src]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> Debug for QualityItem<T> where
T: Debug, [src]
impl<T> Debug for QualityItem<T> where
T: Debug, [src]impl<T> Display for QualityItem<T> where
T: Display, [src]
impl<T> Display for QualityItem<T> where
T: Display, [src]impl<T> FromStr for QualityItem<T> where
T: FromStr, [src]
impl<T> FromStr for QualityItem<T> where
T: FromStr, [src]impl<T> PartialEq<QualityItem<T>> for QualityItem<T> where
T: PartialEq<T>, [src]
impl<T> PartialEq<QualityItem<T>> for QualityItem<T> where
T: PartialEq<T>, [src]pub fn eq(&self, other: &QualityItem<T>) -> bool[src]
pub fn eq(&self, other: &QualityItem<T>) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
pub fn ne(&self, other: &QualityItem<T>) -> bool[src]
pub fn ne(&self, other: &QualityItem<T>) -> bool[src]This method tests for !=.
impl<T> PartialOrd<QualityItem<T>> for QualityItem<T> where
T: PartialEq<T>, [src]
impl<T> PartialOrd<QualityItem<T>> for QualityItem<T> where
T: PartialEq<T>, [src]pub fn partial_cmp(&self, other: &QualityItem<T>) -> Option<Ordering>[src]
pub fn partial_cmp(&self, other: &QualityItem<T>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T> StructuralPartialEq for QualityItem<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for QualityItem<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for QualityItem<T> where
T: Send,
T: Send,
impl<T> Sync for QualityItem<T> where
T: Sync,
T: Sync,
impl<T> Unpin for QualityItem<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for QualityItem<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> IntoCollection<T> for T[src]
impl<T> IntoCollection<T> for T[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more