Trait Output
pub trait Output {
// Required methods
fn println(&mut self, text: &str);
fn print(&mut self, text: &str);
fn eprintln(&mut self, text: &str);
fn flush(&mut self);
}Expand description
Trait for writing output to enable dependency injection and testing
Required Methods§
fn flush(&mut self)
fn flush(&mut self)
Flush the output
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".