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§
fn turn(&self) -> Player
fn winner(&self) -> Option<Player>
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.