Struct ca_formats::CellData
source · 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
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 PartialEq<CellData> for CellData
impl PartialEq<CellData> for CellData
source§impl PartialOrd<CellData> for CellData
impl PartialOrd<CellData> for CellData
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more