#[repr(u8)]pub enum Special {
EnPassant,
Castle(File),
Promote(Role),
}Variants§
Implementations§
Source§impl Special
impl Special
pub const fn en_passant() -> Self
pub const fn castle(file: File) -> Self
pub const fn promote(role: Role) -> Self
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 Special
impl Eq for Special
Source§impl Ord for Special
impl Ord for Special
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 Special
impl PartialOrd for Special
impl StructuralPartialEq for Special
Auto Trait Implementations§
impl Freeze for Special
impl RefUnwindSafe for Special
impl Send for Special
impl Sync for Special
impl Unpin for Special
impl UnsafeUnpin for Special
impl UnwindSafe for Special
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