pub trait Cacheable {
type K;
type V;
// Required method
fn cache(db: &Connection) -> Result<HashMap<Self::K, Self::V>, TableError>;
}Expand description
Table data that can be materialized into an in-memory map.
Required Associated Types§
Required Methods§
Sourcefn cache(db: &Connection) -> Result<HashMap<Self::K, Self::V>, TableError>
fn cache(db: &Connection) -> Result<HashMap<Self::K, Self::V>, TableError>
Build the cache from the database.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".