pub struct PositionRef<'g> { /* private fields */ }Expand description
An immutable reference to a position in a game.
Implementations§
Source§impl PositionRef<'_>
impl PositionRef<'_>
Source§impl<'g> PositionRef<'g>
Access API.
impl<'g> PositionRef<'g>
Access API.
Source§impl<'g> PositionRef<'g>
Traversal API.
impl<'g> PositionRef<'g>
Traversal API.
pub const fn cursor(self) -> CursorRef<'g>
pub const fn play(&self) -> Result<MoveRef<'g>>
pub fn main(&self) -> Result<MoveRef<'g>>
pub fn option(&self, option: impl Choose) -> Result<MoveRef<'g>>
pub fn has_options(&self) -> bool
pub fn has_alternatives(&self) -> bool
pub fn alternatives(&self) -> Moves<'g> ⓘ
pub fn iter(&self) -> Moves<'g> ⓘ
Methods from Deref<Target = Position>§
pub fn options(&self) -> &[MoveSlot]
pub fn position(&self) -> Position
pub fn comment(&self) -> Option<&Text>
pub fn evaluation(&self) -> Option<&Evaluation>
pub fn expanded(&self) -> bool
pub fn legal(&self) -> &[Move]
pub fn check(&self) -> Option<Check>
pub fn is_terminal(&self) -> bool
pub fn terminal(&self) -> Option<Terminal>
pub fn is_checkmate(&self) -> bool
pub fn is_stalemate(&self) -> bool
Methods from Deref<Target = Position>§
pub fn apparent_fen(&self) -> String
pub fn fen(&self) -> String
pub fn chess_fen(&self) -> Option<String>
pub fn shredder_fen(&self) -> String
pub fn transposition_fen(&self) -> String
pub fn legal_plays(&self) -> Vec<Move>
pub fn legal_castle_plays(&self) -> Vec<Move>
pub fn pseudo_piece_plays(&self) -> Vec<Move>
pub fn legal_king_plays(&self) -> Vec<Move>
pub fn can_castle(&self, side: Side) -> Option<Move>
pub fn is_terminal(&self) -> bool
pub fn terminal(&self) -> Option<Terminal>
pub fn board(&self) -> Board
pub fn turn(&self) -> Player
pub fn castles(&self) -> Castles
pub fn en_passant(&self) -> Option<EnPassant>
pub fn reversible(&self) -> u32
pub fn round(&self) -> NonZeroU32
pub fn requires_freestyle(&self) -> bool
pub fn checkers(&self) -> Bitboard
pub fn is_check(&self) -> bool
pub fn capture_plays(&self) -> Vec<Move>
pub fn castle_side_plays(&self, side: Side) -> Vec<Move>
pub fn castle_plays(&self) -> Vec<Move>
pub fn first_ply(&self) -> usize
Trait Implementations§
Source§impl<'g> Clone for PositionRef<'g>
impl<'g> Clone for PositionRef<'g>
Source§fn clone(&self) -> PositionRef<'g>
fn clone(&self) -> PositionRef<'g>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'g> Copy for PositionRef<'g>
Source§impl Deref for PositionRef<'_>
impl Deref for PositionRef<'_>
Auto Trait Implementations§
impl<'g> Freeze for PositionRef<'g>
impl<'g> RefUnwindSafe for PositionRef<'g>
impl<'g> Send for PositionRef<'g>
impl<'g> Sync for PositionRef<'g>
impl<'g> Unpin for PositionRef<'g>
impl<'g> UnsafeUnpin for PositionRef<'g>
impl<'g> UnwindSafe for PositionRef<'g>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more