Struct hexe_core::mv::kind::Promotion
[−]
[src]
pub struct Promotion(_);
A promotion move.
Methods
impl Promotion
[src]
pub fn new(file: File, color: Color, piece: Promotion) -> Promotion
[src]
Creates a new promotion move.
pub fn kind(self) -> Kind
[src]
Returns the kind for self
.
pub fn queen(file: File, color: Color) -> Promotion
[src]
Creates a promotion move using Queen
as its piece.
pub fn color(self) -> Color
[src]
Returns the color of the moving piece.
pub fn piece(self) -> Promotion
[src]
Returns the promotion piece.
Methods from Deref<Target = Move>
Trait Implementations
impl From<Promotion> for Move
[src]
impl From<Promotion> for u16
[src]
impl FromUnchecked<Move> for Promotion
[src]
unsafe fn from_unchecked(mv: Move) -> Promotion
[src]
Performs the unchecked conversion.
impl FromUnchecked<u16> for Promotion
[src]
unsafe fn from_unchecked(bits: u16) -> Promotion
[src]
Performs the unchecked conversion.
impl Deref for Promotion
[src]
type Target = Move
The resulting type after dereferencing.
fn deref(&self) -> &Move
[src]
Dereferences the value.
impl AsRef<Move> for Promotion
[src]
impl PartialEq for Promotion
[src]
fn eq(&self, __arg_0: &Promotion) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Promotion) -> bool
[src]
This method tests for !=
.
impl Eq for Promotion
[src]
impl Clone for Promotion
[src]
fn clone(&self) -> Promotion
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Promotion
[src]
impl Hash for Promotion
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Promotion
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more