[−][src]Struct shakmaty::fen::Fen
A parsed FEN.
Fields
board: Board
pockets: Option<Material>
turn: Color
castling_rights: Bitboard
ep_square: Option<Square>
remaining_checks: Option<RemainingChecks>
halfmoves: u32
fullmoves: u32
Methods
impl Fen
[src]
pub fn empty() -> Fen
[src]
The FEN of the empty position 8/8/8/8/8/8/8/8 w - - 0 1
.
pub fn position<P: FromSetup>(&self) -> Result<P, PositionError>
[src]
pub fn from_ascii(fen: &[u8]) -> Result<Fen, ParseFenError>
[src]
Parses a FEN.
Errors
Returns ParseFenError
if the input is not a valid FEN.
Example
use shakmaty::fen::Fen; let fen = Fen::from_ascii(b"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")?; assert_eq!(fen, Fen::default());
pub fn from_setup<S: Setup>(setup: &S) -> Fen
[src]
Trait Implementations
impl Clone for Fen
[src]
impl Debug for Fen
[src]
impl Default for Fen
[src]
impl Display for Fen
[src]
impl Eq for Fen
[src]
impl FromStr for Fen
[src]
type Err = ParseFenError
The associated error which can be returned from parsing.
fn from_str(fen: &str) -> Result<Fen, ParseFenError>
[src]
impl PartialEq<Fen> for Fen
[src]
impl Setup for Fen
[src]
fn board(&self) -> &Board
[src]
fn pockets(&self) -> Option<&Material>
[src]
fn turn(&self) -> Color
[src]
fn castling_rights(&self) -> Bitboard
[src]
fn ep_square(&self) -> Option<Square>
[src]
fn remaining_checks(&self) -> Option<&RemainingChecks>
[src]
fn halfmoves(&self) -> u32
[src]
fn fullmoves(&self) -> u32
[src]
fn us(&self) -> Bitboard
[src]
fn our(&self, role: Role) -> Bitboard
[src]
fn them(&self) -> Bitboard
[src]
fn their(&self, role: Role) -> Bitboard
[src]
impl StructuralEq for Fen
[src]
impl StructuralPartialEq for Fen
[src]
Auto Trait Implementations
impl RefUnwindSafe for Fen
impl Send for Fen
impl Sync for Fen
impl Unpin for Fen
impl UnwindSafe for Fen
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,