pub trait WriteToFile: Display {
// Provided method
fn write_to_file(&self, filename: &impl AsRef<Path>) -> Result<()> { ... }
}
Expand description
Trait to write something with Display trait into a file.
Provided Methods§
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.