Skip to main content

GameAction

Trait GameAction 

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

Source

fn count() -> usize

Source

fn index(&self) -> usize

Source

fn from_index(index: usize) -> Option<Self>

Provided 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.

Implementors§