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 for CellData
impl PartialEq for CellData
source§impl PartialOrd for CellData
impl PartialOrd 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 moreimpl Copy for CellData
impl Eq for CellData
impl StructuralEq for CellData
impl StructuralPartialEq for CellData
Auto Trait Implementations§
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