#[repr(u8)]pub enum Kind {
Normal,
Special(Special),
}Expand description
What kind of move is it?
Variants§
Implementations§
Source§impl Kind
impl Kind
pub const fn normal() -> Self
pub const fn special(special: Special) -> Self
pub const fn en_passant() -> Self
pub const fn castle(file: File) -> Self
pub const fn promote(role: Role) -> Self
pub const fn is_normal(self) -> bool
pub const fn is_special(self) -> bool
pub const fn specials(self) -> Option<Special>
pub const fn is_en_passant(self) -> bool
pub const fn is_castle(self) -> bool
pub const fn castle_rook_file(self) -> Option<File>
pub const fn is_promote(self) -> bool
pub const fn promotes(self) -> Option<Role>
pub const fn is_promote_role(self, role: Role) -> bool
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
Source§impl Ord for Kind
impl Ord for Kind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Kind
impl PartialOrd for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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