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.
Sourcepub const fn new_value(value: T) -> QualityValue<T>
pub const fn new_value(value: T) -> QualityValue<T>
Creates a new QualityValue from an item value alone.
Trait Implementations§
Source§impl<T> Clone for QualityValue<T>where
T: Clone,
impl<T> Clone for QualityValue<T>where
T: Clone,
Source§fn clone(&self) -> QualityValue<T>
fn clone(&self) -> QualityValue<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T> Copy for QualityValue<T>where
T: Copy,
Source§impl<T> Debug for QualityValue<T>where
T: Debug,
impl<T> Debug for QualityValue<T>where
T: Debug,
Source§impl<T> Display for QualityValue<T>where
T: Display,
impl<T> Display for QualityValue<T>where
T: Display,
impl<T> Eq for QualityValue<T>where
T: Eq,
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<T> FromStr for QualityValue<T>where
T: FromStr,
impl<T> FromStr for QualityValue<T>where
T: FromStr,
Source§impl<T> PartialEq for QualityValue<T>where
T: PartialEq,
impl<T> PartialEq for QualityValue<T>where
T: PartialEq,
Source§fn eq(&self, other: &QualityValue<T>) -> bool
fn eq(&self, other: &QualityValue<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T> PartialOrd for QualityValue<T>where
T: PartialEq,
impl<T> PartialOrd for QualityValue<T>where
T: PartialEq,
impl<T> StructuralPartialEq for QualityValue<T>where
T: PartialEq,
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> UnsafeUnpin for QualityValue<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for QualityValue<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
Source§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> 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.