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§
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<T1, T2> Reflectable for (T1, T2)where
T1: Reflectable,
T2: Reflectable,
impl<T1, T2> Reflectable for (T1, T2)where
T1: Reflectable,
T2: Reflectable,
Source§impl<T1, T2, T3> Reflectable for (T1, T2, T3)
impl<T1, T2, T3> Reflectable for (T1, T2, T3)
Source§impl<T: Reflectable + Ord> Reflectable for BTreeSet<T>
impl<T: Reflectable + Ord> Reflectable for BTreeSet<T>
Source§impl<T: Reflectable + EnumSetType> Reflectable for EnumSet<T>
impl<T: Reflectable + EnumSetType> Reflectable for EnumSet<T>
Source§impl<T: Reflectable> Reflectable for Option<T>
impl<T: Reflectable> Reflectable for Option<T>
Source§impl<T: Reflectable> Reflectable for Vec<T>
impl<T: Reflectable> Reflectable for Vec<T>
Implementors§
impl Reflectable for CastleZone
A castle is reflected by it’s side, i.e.
- WK <==> BK
- WQ <==> BQ
impl Reflectable for Dir
impl Reflectable for Piece
We reflect a piece to it’s correspondent on the opposite side.