pub trait Game {
// Required methods
fn new(args: Args) -> Self;
fn start(&mut self);
fn do_loop(&mut self) -> Result<i32, Box<dyn Error>>;
fn finish(self);
}Expand description
Default methods for a terminal-based game.
Required 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.