pub trait CheckValue<T> {
// Required method
fn check(&self, value: &T) -> Result<()>;
}Expand description
Trait for validating cache values.
This trait can be implemented to provide custom validation logic for cached values. If validation fails, the cached value will be considered invalid and a fresh value will be retrieved.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".