pub struct RecordMove {
pub x: i16,
pub y: i16,
pub dir: Direction,
pub pos: u8,
}Expand description
One move: a new point (x, y) and the line it completes. pos is the index
of the new point within that line, in 0..line_len; the line’s origin is
therefore (x, y) - pos * dir.delta().
Fields§
§x: i16X coordinate of the newly placed point.
y: i16Y coordinate of the newly placed point.
dir: DirectionDirection of the completed line.
pos: u8Index of the new point within the line, in 0..line_len.
Implementations§
Trait Implementations§
Source§impl Clone for RecordMove
impl Clone for RecordMove
Source§fn clone(&self) -> RecordMove
fn clone(&self) -> RecordMove
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RecordMove
Source§impl Debug for RecordMove
impl Debug for RecordMove
Source§impl<'de> Deserialize<'de> for RecordMove
impl<'de> Deserialize<'de> for RecordMove
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 Eq for RecordMove
Source§impl PartialEq for RecordMove
impl PartialEq for RecordMove
Source§fn eq(&self, other: &RecordMove) -> bool
fn eq(&self, other: &RecordMove) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RecordMove
impl Serialize for RecordMove
impl StructuralPartialEq for RecordMove
Auto Trait Implementations§
impl Freeze for RecordMove
impl RefUnwindSafe for RecordMove
impl Send for RecordMove
impl Sync for RecordMove
impl Unpin for RecordMove
impl UnsafeUnpin for RecordMove
impl UnwindSafe for RecordMove
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