Struct shakmaty::fen::Fen [] [src]

pub struct Fen {
    pub board: Board,
    pub pockets: Option<Pockets>,
    pub turn: Color,
    pub castling_rights: Bitboard,
    pub ep_square: Option<Square>,
    pub remaining_checks: Option<RemainingChecks>,
    pub halfmove_clock: u32,
    pub fullmoves: u32,
}

A parsed FEN.

Fields

Methods

impl Fen
[src]

[src]

The FEN of the empty position 8/8/8/8/8/8/8/8 w - - 0 1.

[src]

Set up a Position.

Errors

Returns PositionError if the setup is not a legal position.

[src]

Parses a FEN.

Errors

Returns FenError if the input is not a valid FEN.

Example

use shakmaty::fen::Fen;

let fen = Fen::from_bytes(b"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")?;
assert_eq!(fen, Fen::default());

Trait Implementations

impl Clone for Fen
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Fen
[src]

impl PartialEq for Fen
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for Fen
[src]

[src]

Formats the value using the given formatter.

impl Setup for Fen
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl Default for Fen
[src]

[src]

Returns the "default value" for a type. Read more

impl FromStr for Fen
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl Display for Fen
[src]

[src]

Formats the value using the given formatter. Read more