pub struct CellData {
pub position: Coordinates,
pub state: u8,
}
Expand description
Position and state of a cell.
Rules with more than 256 states are not supported.
Fields§
§position: Coordinates
Coordinates of the cell.
state: u8
State of the cell.
For rules with only 2 states, 0
means dead and 1
means alive.
Trait Implementations§
Source§impl From<(i64, i64)> for CellData
Convert the coordinates into a CellData
with state 1
.
impl From<(i64, i64)> for CellData
Convert the coordinates into a CellData
with state 1
.
Source§fn from(position: Coordinates) -> Self
fn from(position: Coordinates) -> Self
Converts to this type from the input type.
Source§impl Ord for CellData
impl Ord for CellData
Source§impl PartialOrd for CellData
impl PartialOrd for CellData
impl Copy for CellData
impl Eq for CellData
impl StructuralPartialEq for CellData
Auto Trait Implementations§
impl Freeze for CellData
impl RefUnwindSafe for CellData
impl Send for CellData
impl Sync for CellData
impl Unpin for CellData
impl UnwindSafe for CellData
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