pub struct InvalidationPlan {
pub strategy: InvalidationStrategy,
pub estimated_count: usize,
pub affected_tags: Vec<String>,
pub affected_nodes: Vec<String>,
}Expand description
Cache invalidation plan
Fields§
§strategy: InvalidationStrategyStrategy to use
estimated_count: usizeEstimated entries to invalidate
Tags affected
affected_nodes: Vec<String>Node IDs affected
Implementations§
Source§impl InvalidationPlan
impl InvalidationPlan
Sourcepub fn new(strategy: InvalidationStrategy) -> Self
pub fn new(strategy: InvalidationStrategy) -> Self
Create a new invalidation plan
Add affected tags
Sourcepub fn with_nodes(self, nodes: Vec<String>) -> Self
pub fn with_nodes(self, nodes: Vec<String>) -> Self
Add affected node IDs
Sourcepub fn with_count(self, count: usize) -> Self
pub fn with_count(self, count: usize) -> Self
Set estimated count
Trait Implementations§
Source§impl Clone for InvalidationPlan
impl Clone for InvalidationPlan
Source§fn clone(&self) -> InvalidationPlan
fn clone(&self) -> InvalidationPlan
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 InvalidationPlan
impl Debug for InvalidationPlan
Source§impl<'de> Deserialize<'de> for InvalidationPlan
impl<'de> Deserialize<'de> for InvalidationPlan
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
Auto Trait Implementations§
impl Freeze for InvalidationPlan
impl RefUnwindSafe for InvalidationPlan
impl Send for InvalidationPlan
impl Sync for InvalidationPlan
impl Unpin for InvalidationPlan
impl UnwindSafe for InvalidationPlan
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