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: T
The actual contents of the field.
quality: Quality
The 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 copy 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: 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.