[][src]Enum shakmaty::variants::VariantPosition

pub enum VariantPosition {
    Chess(Chess),
    Atomic(Atomic),
    Antichess(Antichess),
    KingOfTheHill(KingOfTheHill),
    ThreeCheck(ThreeCheck),
    Crazyhouse(Crazyhouse),
    RacingKings(RacingKings),
    Horde(Horde),
}

Dynamically dispatched chess variant Position.

Variants

Chess(Chess)
Atomic(Atomic)
Antichess(Antichess)
KingOfTheHill(KingOfTheHill)
ThreeCheck(ThreeCheck)
Crazyhouse(Crazyhouse)
RacingKings(RacingKings)
Horde(Horde)

Implementations

impl VariantPosition[src]

pub fn new(variant: Variant) -> VariantPosition[src]

pub fn from_setup(
    variant: Variant,
    setup: &dyn Setup,
    mode: CastlingMode
) -> Result<VariantPosition, PositionError<VariantPosition>>
[src]

pub fn swap_turn(
    self
) -> Result<VariantPosition, PositionError<VariantPosition>>
[src]

pub fn variant(&self) -> Variant[src]

Trait Implementations

impl Clone for VariantPosition[src]

impl Debug for VariantPosition[src]

impl From<Antichess> for VariantPosition[src]

impl From<Atomic> for VariantPosition[src]

impl From<Chess> for VariantPosition[src]

impl From<Crazyhouse> for VariantPosition[src]

impl From<Horde> for VariantPosition[src]

impl From<KingOfTheHill> for VariantPosition[src]

impl From<RacingKings> for VariantPosition[src]

impl From<ThreeCheck> for VariantPosition[src]

impl Position for VariantPosition[src]

impl Setup for VariantPosition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.