Cacheable

Trait Cacheable 

Source
pub trait Cacheable:
    Any
    + Send
    + Sync {
    // Required methods
    fn load() -> Result<Self>
       where Self: Sized;
    fn store(&self) -> Result<()>;
}
Expand description

A type that can be cached.

Required Methods§

Source

fn load() -> Result<Self>
where Self: Sized,

Load Cacheable from the storage

Source

fn store(&self) -> Result<()>

Write Cacheable back to storage.

Implementors§