pub trait FileOps {
// Required methods
fn path(&self) -> &PathBuf;
fn remove(&self, path: &PathBuf);
fn copy(&self, src: &PathBuf, dest: &PathBuf);
}Expand description
Interface for all file structs to perform common operations
Ensures that all files (file, dir, symlink) have a way of obtaining their path, copying, and deleting
Required Methods§
fn path(&self) -> &PathBuf
fn remove(&self, path: &PathBuf)
fn copy(&self, src: &PathBuf, dest: &PathBuf)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".