pub struct CommonCacheKey {
pub method: Method,
pub path: Option<ByteString>,
pub query: Option<QueryMap>,
pub scheme: Option<Scheme>,
pub host: Option<ByteString>,
pub port: Option<u16>,
pub media_type: Option<MediaType>,
pub languages: Option<BTreeSet<Language>>,
pub extensions: Option<BTreeMap<Bytes, Bytes>>,
}
Expand description
CacheKey implementation designed for common use cases.
Fields§
§method: Method
Method.
path: Option<ByteString>
Optional path.
query: Option<QueryMap>
Optional query (sorted by key).
scheme: Option<Scheme>
Optional scheme.
Not set by default but reserved for custom use.
host: Option<ByteString>
Optional host.
Not set by default but reserved for custom use.
port: Option<u16>
Optional port.
Not set by default but reserved for custom use.
media_type: Option<MediaType>
Optional media type.
Not set by default but reserved for custom use.
languages: Option<BTreeSet<Language>>
Optional languages (sorted).
Not set by default but reserved for custom use.
extensions: Option<BTreeMap<Bytes, Bytes>>
Optional extensions (sorted by key).
Not set by default but reserved for custom use.
Implementations§
Trait Implementations§
Source§impl CacheKey for CommonCacheKey
impl CacheKey for CommonCacheKey
Source§impl CacheWeight for CommonCacheKey
impl CacheWeight for CommonCacheKey
Source§fn cache_weight(&self) -> usize
fn cache_weight(&self) -> usize
Cache weight as a byte count. Read more
Source§impl Clone for CommonCacheKey
impl Clone for CommonCacheKey
Source§fn clone(&self) -> CommonCacheKey
fn clone(&self) -> CommonCacheKey
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 Debug for CommonCacheKey
impl Debug for CommonCacheKey
Source§impl Display for CommonCacheKey
impl Display for CommonCacheKey
Source§impl Hash for CommonCacheKey
impl Hash for CommonCacheKey
Source§impl PartialEq for CommonCacheKey
impl PartialEq for CommonCacheKey
impl Eq for CommonCacheKey
impl StructuralPartialEq for CommonCacheKey
Auto Trait Implementations§
impl !Freeze for CommonCacheKey
impl RefUnwindSafe for CommonCacheKey
impl Send for CommonCacheKey
impl Sync for CommonCacheKey
impl Unpin for CommonCacheKey
impl UnwindSafe for CommonCacheKey
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.