pub trait Cacher {
// Required methods
fn read(&mut self, url: &str) -> Result<Option<String>, HandlerError>;
fn write(&mut self, url: &str, content: &str) -> Result<(), HandlerError>;
// Provided method
fn get_file_path(&self, _url: &str) -> Result<Option<PathBuf>, HandlerError> { ... }
}Expand description
A system for reading and writing to a cache for URL based configurations.
Required Methods§
Provided Methods§
Sourcefn get_file_path(&self, _url: &str) -> Result<Option<PathBuf>, HandlerError>
fn get_file_path(&self, _url: &str) -> Result<Option<PathBuf>, HandlerError>
If the content was cached to the local file system, return the absolute path.