pub enum PatternStrategy {
Wildcard(String),
Regex(String),
Prefix(String),
Suffix(String),
Contains(String),
}Expand description
Pattern matching strategy for cache key invalidation
Variants§
Wildcard(String)
Simple wildcard matching (*, ?)
Regex(String)
Full regex pattern matching
Prefix(String)
Prefix matching
Suffix(String)
Suffix matching
Contains(String)
Contains matching
Implementations§
Source§impl PatternStrategy
impl PatternStrategy
Sourcepub fn matches(&self, key: &str) -> CacheResult<bool>
pub fn matches(&self, key: &str) -> CacheResult<bool>
Check if a key matches this pattern
Trait Implementations§
Source§impl Clone for PatternStrategy
impl Clone for PatternStrategy
Source§fn clone(&self) -> PatternStrategy
fn clone(&self) -> PatternStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PatternStrategy
impl RefUnwindSafe for PatternStrategy
impl Send for PatternStrategy
impl Sync for PatternStrategy
impl Unpin for PatternStrategy
impl UnsafeUnpin for PatternStrategy
impl UnwindSafe for PatternStrategy
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