Skip to main content

Cache

Trait Cache 

Source
pub trait Cache: Default {
    // Required methods
    fn load(base: &Path) -> Result<Self>
       where Self: Sized;
    fn save(&self, base: &Path) -> Result<()>;

    // Provided methods
    fn verify(&mut self) -> Result<()> { ... }
    fn cleanup(&mut self) -> Result<()> { ... }
}

Required Methods§

Source

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

Source

fn save(&self, base: &Path) -> Result<()>

Provided Methods§

Source

fn verify(&mut self) -> Result<()>

Source

fn cleanup(&mut self) -> Result<()>

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.

Implementors§