pub struct CompactCacheKey {
pub primary: HashBinary,
pub variance: Option<Box<HashBinary>>,
pub user_tag: Box<str>,
}
Expand description
Storage optimized cache key to keep in memory or in storage
Fields§
§primary: HashBinary
§variance: Option<Box<HashBinary>>
§user_tag: Box<str>
Trait Implementations§
Source§impl CacheHashKey for CompactCacheKey
impl CacheHashKey for CompactCacheKey
Source§fn primary_bin(&self) -> HashBinary
fn primary_bin(&self) -> HashBinary
Return the hash of the cache key
Source§fn variance_bin(&self) -> Option<HashBinary>
fn variance_bin(&self) -> Option<HashBinary>
Return the variance hash of the cache key. Read more
Source§fn combined_bin(&self) -> HashBinary
fn combined_bin(&self) -> HashBinary
Return the hash including both primary and variance keys
Source§fn primary(&self) -> String
fn primary(&self) -> String
The hex string of Self::primary_bin()
Source§fn combined(&self) -> String
fn combined(&self) -> String
The hex string of Self::combined_bin()
Source§impl Clone for CompactCacheKey
impl Clone for CompactCacheKey
Source§fn clone(&self) -> CompactCacheKey
fn clone(&self) -> CompactCacheKey
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 Debug for CompactCacheKey
impl Debug for CompactCacheKey
Source§impl<'de> Deserialize<'de> for CompactCacheKey
impl<'de> Deserialize<'de> for CompactCacheKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for CompactCacheKey
impl Hash for CompactCacheKey
Source§impl Ord for CompactCacheKey
impl Ord for CompactCacheKey
Source§fn cmp(&self, other: &CompactCacheKey) -> Ordering
fn cmp(&self, other: &CompactCacheKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CompactCacheKey
impl PartialEq for CompactCacheKey
Source§impl PartialOrd for CompactCacheKey
impl PartialOrd for CompactCacheKey
Source§impl Serialize for CompactCacheKey
impl Serialize for CompactCacheKey
impl Eq for CompactCacheKey
impl StructuralPartialEq for CompactCacheKey
Auto Trait Implementations§
impl Freeze for CompactCacheKey
impl RefUnwindSafe for CompactCacheKey
impl Send for CompactCacheKey
impl Sync for CompactCacheKey
impl Unpin for CompactCacheKey
impl UnwindSafe for CompactCacheKey
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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<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.