Trait schematic::Cacher

source ·
pub trait Cacher {
    // Required methods
    fn read(&mut self, url: &str) -> Result<Option<String>, ConfigError>;
    fn write(&mut self, url: &str, content: &str) -> Result<(), ConfigError>;
}
Expand description

A system for reading and writing to a cache for URL based configurations.

Required Methods§

source

fn read(&mut self, url: &str) -> Result<Option<String>, ConfigError>

Read content from the cache store.

source

fn write(&mut self, url: &str, content: &str) -> Result<(), ConfigError>

Write the provided content to the cache store.

Implementors§