pub struct Move { /* private fields */ }Implementations§
Source§impl Move
impl Move
pub const fn new_unchecked( source: Square, dest: Square, promotion: Option<PieceType>, ) -> Self
pub const fn new( source: Square, dest: Square, promotion: Option<PieceType>, ) -> Result<Self>
pub const fn get_source(&self) -> Square
pub const fn get_dest(&self) -> Square
pub const fn get_promotion(&self) -> Option<PieceType>
pub fn from_uci(uci: &str) -> Result<Self>
pub fn from_san(position: &ChessPosition, san: &str) -> Result<Self>
pub fn from_lan(position: &ChessPosition, lan: &str) -> Result<Self>
pub fn algebraic_without_suffix( self, position: &ChessPosition, long: bool, ) -> Result<String>
pub fn algebraic_and_new_position( self, position: &ChessPosition, long: bool, ) -> Result<(String, ChessPosition)>
Trait Implementations§
Source§impl BoardMethodOverload<Move> for Board
impl BoardMethodOverload<Move> for Board
Source§impl Compress for Move
impl Compress for Move
type CompressedItem = u16
fn compress(self) -> Self::CompressedItem
Source§impl<'de> Deserialize<'de> for Move
impl<'de> Deserialize<'de> for Move
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&Move> for ValidOrNullMove
impl From<&Move> for ValidOrNullMove
Source§impl From<Move> for ValidOrNullMove
impl From<Move> for ValidOrNullMove
Source§impl<'source> FromPyObject<'source> for Move
impl<'source> FromPyObject<'source> for Move
Source§impl<P: PositionEvaluation> SearcherMethodOverload<Move> for Searcher<P>
impl<P: PositionEvaluation> SearcherMethodOverload<Move> for Searcher<P>
fn push_unchecked(&mut self, move_: Move)
Source§impl StringifyMove for Move
impl StringifyMove for Move
fn uci(self) -> String
fn algebraic(self, position: &ChessPosition, long: bool) -> Result<String>
fn stringify_move(self, position: &ChessPosition) -> Result<String>
fn san(self, position: &ChessPosition) -> Result<String>where
Self: Sized,
fn lan(self, position: &ChessPosition) -> Result<String>where
Self: Sized,
impl Copy for Move
impl Eq for Move
impl StructuralPartialEq for Move
Auto Trait Implementations§
impl Freeze for Move
impl RefUnwindSafe for Move
impl Send for Move
impl Sync for Move
impl Unpin for Move
impl UnwindSafe for Move
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomColorize for Twhere
T: ToString,
impl<T> CustomColorize for Twhere
T: ToString,
fn colorize( &self, style_functions: &[fn(_: ColoredString) -> ColoredString], ) -> String
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
Source§impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more