#[repr(u8)]pub enum Square {
Show 64 variants
A8 = 0,
B8 = 1,
C8 = 2,
D8 = 3,
E8 = 4,
F8 = 5,
G8 = 6,
H8 = 7,
A7 = 8,
B7 = 9,
C7 = 10,
D7 = 11,
E7 = 12,
F7 = 13,
G7 = 14,
H7 = 15,
A6 = 16,
B6 = 17,
C6 = 18,
D6 = 19,
E6 = 20,
F6 = 21,
G6 = 22,
H6 = 23,
A5 = 24,
B5 = 25,
C5 = 26,
D5 = 27,
E5 = 28,
F5 = 29,
G5 = 30,
H5 = 31,
A4 = 32,
B4 = 33,
C4 = 34,
D4 = 35,
E4 = 36,
F4 = 37,
G4 = 38,
H4 = 39,
A3 = 40,
B3 = 41,
C3 = 42,
D3 = 43,
E3 = 44,
F3 = 45,
G3 = 46,
H3 = 47,
A2 = 48,
B2 = 49,
C2 = 50,
D2 = 51,
E2 = 52,
F2 = 53,
G2 = 54,
H2 = 55,
A1 = 56,
B1 = 57,
C1 = 58,
D1 = 59,
E1 = 60,
F1 = 61,
G1 = 62,
H1 = 63,
}Variants§
A8 = 0
B8 = 1
C8 = 2
D8 = 3
E8 = 4
F8 = 5
G8 = 6
H8 = 7
A7 = 8
B7 = 9
C7 = 10
D7 = 11
E7 = 12
F7 = 13
G7 = 14
H7 = 15
A6 = 16
B6 = 17
C6 = 18
D6 = 19
E6 = 20
F6 = 21
G6 = 22
H6 = 23
A5 = 24
B5 = 25
C5 = 26
D5 = 27
E5 = 28
F5 = 29
G5 = 30
H5 = 31
A4 = 32
B4 = 33
C4 = 34
D4 = 35
E4 = 36
F4 = 37
G4 = 38
H4 = 39
A3 = 40
B3 = 41
C3 = 42
D3 = 43
E3 = 44
F3 = 45
G3 = 46
H3 = 47
A2 = 48
B2 = 49
C2 = 50
D2 = 51
E2 = 52
F2 = 53
G2 = 54
H2 = 55
A1 = 56
B1 = 57
C1 = 58
D1 = 59
E1 = 60
F1 = 61
G1 = 62
H1 = 63
Implementations§
Source§impl Square
impl Square
pub const fn from_u8(num: u8) -> Self
Sourcepub unsafe fn from_u8_unchecked(num: u8) -> Self
pub unsafe fn from_u8_unchecked(num: u8) -> Self
the number needs to be lower than 64
pub fn x(&self) -> u8
pub fn x_letter(&self) -> u8
pub fn y(&self) -> u8
pub const fn from_xy(x: u8, y: u8) -> Self
pub fn add_dir(&self, dir: Direction) -> Option<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Square
impl<'de> Deserialize<'de> for Square
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
impl Copy for Square
impl Eq for Square
impl StructuralPartialEq for Square
Auto Trait Implementations§
impl Freeze for Square
impl RefUnwindSafe for Square
impl Send for Square
impl Sync for Square
impl Unpin for Square
impl UnwindSafe for Square
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