pub struct ValidationCache { /* private fields */ }Expand description
Cache for validation results
Implementations§
Source§impl ValidationCache
impl ValidationCache
pub fn new() -> Self
Sourcepub fn cache_domain(&mut self, domain: impl Into<String>, errors: Vec<String>)
pub fn cache_domain(&mut self, domain: impl Into<String>, errors: Vec<String>)
Cache domain validation results
Sourcepub fn cache_predicate(
&mut self,
predicate: impl Into<String>,
errors: Vec<String>,
)
pub fn cache_predicate( &mut self, predicate: impl Into<String>, errors: Vec<String>, )
Cache predicate validation results
Sourcepub fn cache_variable(
&mut self,
variable: impl Into<String>,
errors: Vec<String>,
)
pub fn cache_variable( &mut self, variable: impl Into<String>, errors: Vec<String>, )
Cache variable validation results
Sourcepub fn get_predicate(&self, predicate: &str) -> Option<&Vec<String>>
pub fn get_predicate(&self, predicate: &str) -> Option<&Vec<String>>
Get cached predicate result
Sourcepub fn invalidate(&mut self, affected: &AffectedComponents)
pub fn invalidate(&mut self, affected: &AffectedComponents)
Invalidate cache entries for affected components
Trait Implementations§
Source§impl Clone for ValidationCache
impl Clone for ValidationCache
Source§fn clone(&self) -> ValidationCache
fn clone(&self) -> ValidationCache
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 ValidationCache
impl Debug for ValidationCache
Source§impl Default for ValidationCache
impl Default for ValidationCache
Source§fn default() -> ValidationCache
fn default() -> ValidationCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationCache
impl RefUnwindSafe for ValidationCache
impl Send for ValidationCache
impl Sync for ValidationCache
impl Unpin for ValidationCache
impl UnwindSafe for ValidationCache
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