pub enum PurgeTarget<'a> {
Active(&'a CompactCacheKey),
Exact(&'a CacheEntryKey),
}Expand description
The entry a Storage::purge call should remove.
Variants§
Active(&'a CompactCacheKey)
Remove storage’s current entry for this logical cache key.
This targets one entry. Storage that retains multiple generations for a logical key does not need to remove inactive generations. Storage must not remove an entry with a different logical key. When storage retains multiple generations, it may select which identity to remove.
Exact(&'a CacheEntryKey)
Remove this exact cache entry.
Storage must match the complete identity, including any CacheEntryId.
Implementations§
Source§impl<'a> PurgeTarget<'a>
impl<'a> PurgeTarget<'a>
Sourcepub fn key(self) -> &'a CompactCacheKey
pub fn key(self) -> &'a CompactCacheKey
Return the target’s logical cache key.
Sourcepub fn removed_entry(self, id: Option<CacheEntryId>) -> CacheEntryKeyRef<'a>
pub fn removed_entry(self, id: Option<CacheEntryId>) -> CacheEntryKeyRef<'a>
Return a borrowed identity for the removed entry.
id supplies identity discovered while resolving a PurgeTarget::Active target. It is
ignored for a PurgeTarget::Exact target, which already contains the complete identity;
if supplied, it must match that identity.
Trait Implementations§
Source§impl<'a> Clone for PurgeTarget<'a>
impl<'a> Clone for PurgeTarget<'a>
Source§fn clone(&self) -> PurgeTarget<'a>
fn clone(&self) -> PurgeTarget<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for PurgeTarget<'a>
Source§impl<'a> Debug for PurgeTarget<'a>
impl<'a> Debug for PurgeTarget<'a>
Source§impl Display for PurgeTarget<'_>
impl Display for PurgeTarget<'_>
impl<'a> Eq for PurgeTarget<'a>
Source§impl<'a> PartialEq for PurgeTarget<'a>
impl<'a> PartialEq for PurgeTarget<'a>
impl<'a> StructuralPartialEq for PurgeTarget<'a>
Auto Trait Implementations§
impl<'a> Freeze for PurgeTarget<'a>
impl<'a> RefUnwindSafe for PurgeTarget<'a>
impl<'a> Send for PurgeTarget<'a>
impl<'a> Sync for PurgeTarget<'a>
impl<'a> Unpin for PurgeTarget<'a>
impl<'a> UnsafeUnpin for PurgeTarget<'a>
impl<'a> UnwindSafe for PurgeTarget<'a>
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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
key and return true if they are equal.