pub struct Query<'a> { /* private fields */ }
Expand description
A set of QueryPair
s, parsed from a query
.
This is a multimap (one to many relation between keys and values) struct. A query can have multiple values per name. If we always use the first or last value of a name in a query, subtle exploits slip in. You have to make a explicit choice of what to do in this implementation.
Note that the order of the names in the Display
implementation may be in the right order.
Implementations§
source§impl<'a> Query<'a>
impl<'a> Query<'a>
sourcepub fn get_all(&self, name: &'a str) -> QueryPairIter<'_> ⓘ
pub fn get_all(&self, name: &'a str) -> QueryPairIter<'_> ⓘ
Returns a iterator of all values with name
.
Don’t use this to get the first or last item; you’ll get the same drawbacks as
Self::get_first
and Self::get_last
.
Trait Implementations§
impl<'a> Eq for Query<'a>
impl<'a> StructuralPartialEq for Query<'a>
Auto Trait Implementations§
impl<'a> Freeze for Query<'a>
impl<'a> RefUnwindSafe for Query<'a>
impl<'a> Send for Query<'a>
impl<'a> Sync for Query<'a>
impl<'a> Unpin for Query<'a>
impl<'a> UnwindSafe for Query<'a>
Blanket Implementations§
source§impl<T> AsCleanDebug for Twhere
T: Display,
impl<T> AsCleanDebug for Twhere
T: Display,
source§fn as_clean(&self) -> CleanDebug<'_, Self>where
Self: Display,
fn as_clean(&self) -> CleanDebug<'_, Self>where
Self: Display,
Get a
CleanDebug
for Self. Read moresource§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more