pub trait FilePath {
// Required methods
fn write(&self, msg: String) -> Result<()>;
fn read(&self) -> Result<String>;
// Provided method
fn is_empty(&self) -> Result<bool> { ... }
}Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".