pub enum ExtensionCacheSelector {
All,
Family {
family_id: &'static str,
},
Cache {
family_id: &'static str,
cache_name: &'static str,
},
}Expand description
Selector used to inspect or clear extension cache entries.
Variants§
All
Select every extension cache entry.
Family
Select every entry owned by an extension family.
Cache
Select entries in one named cache for one extension family.
Implementations§
Source§impl ExtensionCacheSelector
impl ExtensionCacheSelector
Sourcepub fn matches(&self, key: &ExtensionCacheKey) -> bool
pub fn matches(&self, key: &ExtensionCacheKey) -> bool
Return true when this selector includes key.
§Examples
use tenferro_runtime::{ExtensionCacheKey, ExtensionCacheSelector};
let key = ExtensionCacheKey::new("example.identity.v1", "plans", 0);
assert!(ExtensionCacheSelector::Family {
family_id: "example.identity.v1",
}.matches(&key));Trait Implementations§
Source§impl Clone for ExtensionCacheSelector
impl Clone for ExtensionCacheSelector
Source§fn clone(&self) -> ExtensionCacheSelector
fn clone(&self) -> ExtensionCacheSelector
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 ExtensionCacheSelector
impl Debug for ExtensionCacheSelector
Source§impl Hash for ExtensionCacheSelector
impl Hash for ExtensionCacheSelector
Source§impl PartialEq for ExtensionCacheSelector
impl PartialEq for ExtensionCacheSelector
impl Copy for ExtensionCacheSelector
impl Eq for ExtensionCacheSelector
impl StructuralPartialEq for ExtensionCacheSelector
Auto Trait Implementations§
impl Freeze for ExtensionCacheSelector
impl RefUnwindSafe for ExtensionCacheSelector
impl Send for ExtensionCacheSelector
impl Sync for ExtensionCacheSelector
impl Unpin for ExtensionCacheSelector
impl UnsafeUnpin for ExtensionCacheSelector
impl UnwindSafe for ExtensionCacheSelector
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,
§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.