[−][src]Enum conway::universe::CellState
Variants
Dead
Alive(Option<usize>)
Wall
Fog
Methods
impl CellState
[src]
pub fn to_char(self) -> char
[src]
Convert this CellState
to a char
. When the state is Alive(None)
or Dead
, this will
match what would be found in a .rle file. Wall
, Alive(Some(player_id))
, and Fog
are
unsupported in vanilla CGoL, and thus are not part of the RLE
specification.
Panics
Panics if player_id
is not less than 23, since we map IDs 0 through 22 to uppercase
letters A through V. W is not usable since it represents a wall cell.
pub fn from_char(ch: char) -> Option<Self>
[src]
Trait Implementations
impl PartialOrd<CellState> for CellState
[src]
fn partial_cmp(&self, other: &CellState) -> Option<Ordering>
[src]
fn lt(&self, other: &CellState) -> bool
[src]
fn le(&self, other: &CellState) -> bool
[src]
fn gt(&self, other: &CellState) -> bool
[src]
fn ge(&self, other: &CellState) -> bool
[src]
impl Copy for CellState
[src]
impl PartialEq<CellState> for CellState
[src]
impl Clone for CellState
[src]
fn clone(&self) -> CellState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for CellState
[src]
fn cmp(&self, other: &CellState) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Eq for CellState
[src]
impl Debug for CellState
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,