Skip to main content

Measure

Trait Measure 

Source
pub trait Measure<R: Sides> {
    // Required methods
    fn observe(&mut self, rules: &R, command: &R::Command, events: &[R::Event]);
    fn finish(self: Box<Self>, report: &Report<R>, end: &R) -> Measures;
}
Expand description

A game’s measures of a try, watching it command by command.

Required Methods§

Source

fn observe(&mut self, rules: &R, command: &R::Command, events: &[R::Event])

Called for every applied command: the game after it, the command and the events it gave.

Source

fn finish(self: Box<Self>, report: &Report<R>, end: &R) -> Measures

The measures of the try, once it has stopped at end.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§