pub trait GameAction:
Copy
+ Eq
+ Debug
+ 'static {
// Required methods
fn count() -> usize;
fn index(&self) -> usize;
fn from_index(index: usize) -> Option<Self>;
// Provided methods
fn move_negative_x() -> Option<Self> { ... }
fn move_positive_x() -> Option<Self> { ... }
fn move_negative_y() -> Option<Self> { ... }
fn move_positive_y() -> Option<Self> { ... }
}Required Methods§
fn count() -> usize
fn index(&self) -> usize
fn from_index(index: usize) -> Option<Self>
Provided Methods§
fn move_negative_x() -> Option<Self>
fn move_positive_x() -> Option<Self>
fn move_negative_y() -> Option<Self>
fn move_positive_y() -> Option<Self>
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.