pub struct QualityValue<T> {
pub value: T,
pub quality: Quality,
}Expand description
Represents an item with a quality value as defined in RFC7231.
Fields§
§value: TThe actual contents of the field.
quality: QualityThe quality (client or server preference) for the value.
Implementations§
Source§impl<T> QualityValue<T>
impl<T> QualityValue<T>
Sourcepub const fn new(value: T, quality: Quality) -> QualityValue<T>
pub const fn new(value: T, quality: Quality) -> QualityValue<T>
Creates a new QualityValue from an item and a quality.
Trait Implementations§
Source§impl<T: Clone> Clone for QualityValue<T>
impl<T: Clone> Clone for QualityValue<T>
Source§fn clone(&self) -> QualityValue<T>
fn clone(&self) -> QualityValue<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for QualityValue<T>
impl<T: Debug> Debug for QualityValue<T>
Source§impl<T: Display> Display for QualityValue<T>
impl<T: Display> Display for QualityValue<T>
Source§impl<T> From<T> for QualityValue<T>
impl<T> From<T> for QualityValue<T>
Source§fn from(value: T) -> QualityValue<T>
fn from(value: T) -> QualityValue<T>
Converts to this type from the input type.
Source§impl FromIterator<QualityValue<Mime>> for Accept
impl FromIterator<QualityValue<Mime>> for Accept
Source§impl<T: FromStr> FromStr for QualityValue<T>
impl<T: FromStr> FromStr for QualityValue<T>
Source§impl<T: PartialEq> PartialEq for QualityValue<T>
impl<T: PartialEq> PartialEq for QualityValue<T>
Source§impl<T: PartialEq> PartialOrd for QualityValue<T>
impl<T: PartialEq> PartialOrd for QualityValue<T>
impl<T: Copy> Copy for QualityValue<T>
impl<T: Eq> Eq for QualityValue<T>
impl<T> StructuralPartialEq for QualityValue<T>
Auto Trait Implementations§
impl<T> Freeze for QualityValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for QualityValue<T>where
T: RefUnwindSafe,
impl<T> Send for QualityValue<T>where
T: Send,
impl<T> Sync for QualityValue<T>where
T: Sync,
impl<T> Unpin for QualityValue<T>where
T: Unpin,
impl<T> UnwindSafe for QualityValue<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more