pub trait FileSystem:
Debug
+ Send
+ Sync {
// Required methods
fn read(&self, path: &Path) -> Result<Vec<u8>>;
fn write(&self, path: &Path, contents: &[u8]) -> Result<()>;
fn exists(&self, path: &Path) -> bool;
}Expand description
Minimal file system access used by the odx library crates.
Required Methods§
Sourcefn read(&self, path: &Path) -> Result<Vec<u8>>
fn read(&self, path: &Path) -> Result<Vec<u8>>
Read the whole file at path.
§Errors
Returns an error when the file does not exist or cannot be read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".