[][src]Trait weasel::battle::BattleController

pub trait BattleController<R: BattleRules> {
    fn battle(&self) -> &Battle<R>;
fn event_callback(&self) -> &Option<EventCallback<R>>;
fn set_event_callback(&mut self, callback: Option<EventCallback<R>>); }

A trait for types that have control over a battle.

Required methods

fn battle(&self) -> &Battle<R>

Returns a reference to the battle.

fn event_callback(&self) -> &Option<EventCallback<R>>

Returns the current event callback set to the battle.

fn set_event_callback(&mut self, callback: Option<EventCallback<R>>)

Sets a new event callback for the battle. The current callback is discarded.

Loading content...

Implementors

impl<R: BattleRules> BattleController<R> for Client<R>[src]

impl<R: BattleRules> BattleController<R> for Server<R>[src]

Loading content...