Skip to main content

CacheEnvironment

Trait CacheEnvironment 

Source
pub trait CacheEnvironment: Send + Sync {
    // Required methods
    fn cache_dir(&self) -> Option<PathBuf>;
    fn read_file(&self, path: &Path) -> Result<String, Error>;
    fn write_file(&self, path: &Path, content: &str) -> Result<(), Error>;
    fn create_dir_all(&self, path: &Path) -> Result<(), Error>;
}

Required Methods§

Source

fn cache_dir(&self) -> Option<PathBuf>

Source

fn read_file(&self, path: &Path) -> Result<String, Error>

Source

fn write_file(&self, path: &Path, content: &str) -> Result<(), Error>

Source

fn create_dir_all(&self, path: &Path) -> Result<(), Error>

Implementors§