pub trait Cacheable: Serialize + DeserializeOwned {
type Key: Cachekey;
// Provided methods
fn from_cache<P: AsRef<Path>>(key: Self::Key, cache: P) -> Option<Self> { ... }
fn cache<P: AsRef<Path>>(&self, key: Self::Key, cache: P) { ... }
}Required Associated Types§
Provided Methods§
fn from_cache<P: AsRef<Path>>(key: Self::Key, cache: P) -> Option<Self>
fn cache<P: AsRef<Path>>(&self, key: Self::Key, cache: P)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.