Struct hexe_core::mv::kind::Castle
[−]
[src]
pub struct Castle(_);
A castling move.
Methods
impl Castle
[src]
pub fn new(right: Right) -> Castle
[src]
Creates a new instance for the castle right.
pub fn try_new(src: Square, dst: Square) -> Option<Castle>
[src]
Attempts to create a new castle move for the given squares.
pub fn kind(self) -> Kind
[src]
Returns the kind for self
.
pub fn right(self) -> Right
[src]
Returns the castle right for self
.
Methods from Deref<Target = Move>
Trait Implementations
impl From<Castle> for Move
[src]
impl From<Castle> for u16
[src]
impl FromUnchecked<Move> for Castle
[src]
unsafe fn from_unchecked(mv: Move) -> Castle
[src]
Performs the unchecked conversion.
impl FromUnchecked<u16> for Castle
[src]
unsafe fn from_unchecked(bits: u16) -> Castle
[src]
Performs the unchecked conversion.
impl Deref for Castle
[src]
type Target = Move
The resulting type after dereferencing.
fn deref(&self) -> &Move
[src]
Dereferences the value.
impl AsRef<Move> for Castle
[src]
impl PartialEq for Castle
[src]
fn eq(&self, __arg_0: &Castle) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Castle) -> bool
[src]
This method tests for !=
.
impl Eq for Castle
[src]
impl Clone for Castle
[src]
fn clone(&self) -> Castle
[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 Castle
[src]
impl Hash for Castle
[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 Castle
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more