pub trait RulesModule {
// Provided methods
fn on_event(&self, _ctx: &RulesContext<'_>, _ev: &Event) -> Vec<Command> { ... }
fn legal_overrides(
&self,
_ctx: &RulesContext<'_>,
_player: PlayerId,
) -> Vec<Action> { ... }
}Expand description
Rule module trait: returns commands in response to events or legality overrides.
Provided Methods§
fn on_event(&self, _ctx: &RulesContext<'_>, _ev: &Event) -> Vec<Command>
fn legal_overrides( &self, _ctx: &RulesContext<'_>, _player: PlayerId, ) -> Vec<Action>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".