WriteToFile

Trait WriteToFile 

Source
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§

Source

fn write_to_file(&self, filename: &impl AsRef<Path>) -> Result<()>

Write something to a file.

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.

Implementors§