State

Trait State 

Source
pub trait State: Sized {
    // Required methods
    fn turn(&self) -> Player;
    fn winner(&self) -> Option<Player>;
    fn valid_moves(&self) -> impl Iterator<Item = Self>;
}

Required Methods§

Source

fn turn(&self) -> Player

Source

fn winner(&self) -> Option<Player>

Source

fn valid_moves(&self) -> impl Iterator<Item = Self>

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§