pub trait FileSystem {
// Required methods
fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>;
fn create_file<P: AsRef<Path>>(&self, path: P) -> Result<File>;
fn open_file<P: AsRef<Path>>(&self, path: P) -> Result<File>;
fn remove_file<P: AsRef<Path>>(&self, path: P) -> Result<()>;
}Required Methods§
fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
fn create_file<P: AsRef<Path>>(&self, path: P) -> Result<File>
fn open_file<P: AsRef<Path>>(&self, path: P) -> Result<File>
fn remove_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.