pub trait GameWriter {
// Required methods
fn write(&mut self, text: &str);
fn flush(&mut self) -> Result<()>;
fn clear_screen(&mut self);
}Expand description
Abstraction over the output stream so the game can capture its frames.
Required Methods§
Sourcefn clear_screen(&mut self)
fn clear_screen(&mut self)
Clears the whole terminal and homes the cursor.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".