Skip to main content

ActionIds

Trait ActionIds 

Source
pub trait ActionIds: ActionSet {
    // Required methods
    fn id(self) -> ActionId;
    fn from_id(id: ActionId) -> Option<Self>;
}
Expand description

A game’s action as a step’s input holds it (ActionId): its place in ActionSet::ALL. Every ActionSet has it.

Required Methods§

Source

fn id(self) -> ActionId

Its id: its place in ActionSet::ALL, from 0 (u16::MAX for an action that isn’t there, or past it).

Source

fn from_id(id: ActionId) -> Option<Self>

The action whose id is id, if there is one.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§