pub trait CacheSource:
'static
+ Send
+ Sync {
type Value: 'static;
// Required method
fn load(&self, id: &str, create: bool) -> Result<Self::Value>;
// Provided methods
fn unload(&self, _id: &str, _obj: &Self::Value) -> Result<()> { ... }
fn remove(&self, _id: &str) -> Result<()> { ... }
}Expand description
A source where cache can be generated from.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".