pub trait Storage: Send + Sync {
// Required methods
fn read(&self, path: &Path) -> Result<String>;
fn write(&self, path: &Path, content: &str) -> Result<()>;
fn delete(&self, path: &Path) -> Result<()>;
fn list(&self, dir: &Path) -> Result<Vec<PathBuf>>;
fn create_dir_all(&self, path: &Path) -> Result<()>;
fn exists(&self, path: &Path) -> bool;
fn rename(&self, from: &Path, to: &Path) -> Result<()>;
}Expand description
Abstraction over filesystem operations used by the memory system.