Trait Reflectable

Source
pub trait Reflectable {
    // Required method
    fn reflect(&self) -> Self;
}
Expand description

Chess is a symmetric game and this trait represents a component of the game which can be reflected to it’s symmetric opposite component.

Required Methods§

Source

fn reflect(&self) -> 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.

Implementations on Foreign Types§

Source§

impl Reflectable for i32

Source§

fn reflect(&self) -> Self

Source§

impl<T1, T2> Reflectable for (T1, T2)
where T1: Reflectable, T2: Reflectable,

Source§

fn reflect(&self) -> Self

Source§

impl<T1, T2, T3> Reflectable for (T1, T2, T3)
where T1: Reflectable, T2: Reflectable, T3: Reflectable,

Source§

fn reflect(&self) -> Self

Source§

impl<T: Reflectable + Ord> Reflectable for BTreeSet<T>

Source§

fn reflect(&self) -> Self

Source§

impl<T: Reflectable + EnumSetType> Reflectable for EnumSet<T>

Source§

fn reflect(&self) -> Self

Source§

impl<T: Reflectable> Reflectable for Option<T>

Source§

fn reflect(&self) -> Self

Source§

impl<T: Reflectable> Reflectable for Vec<T>

Source§

fn reflect(&self) -> Self

Implementors§

Source§

impl Reflectable for CastleZone

A castle is reflected by it’s side, i.e.

  • WK <==> BK
  • WQ <==> BQ
Source§

impl Reflectable for Dir

Source§

impl Reflectable for Piece

We reflect a piece to it’s correspondent on the opposite side.

Source§

impl Reflectable for Side

Source§

impl Reflectable for Square

Source§

impl Reflectable for BitBoard