struct Pots {
state: Vec<u8>,
prev_state: Vec<u8>,
pos: i64,
}Fields§
§state: Vec<u8>Vector representing the pots. 1 means there is a plant in the pot, 0 means there isn’t.
prev_state: Vec<u8>A copy of the vector state before Self::step was called.
pos: i64The id of the pot at the beginning of the bit vector state.
Implementations§
Source§impl Pots
impl Pots
Sourcefn step(&mut self, rules: &[u8; 32])
fn step(&mut self, rules: &[u8; 32])
Applies the given rules to the pots and updates Self::state. A copy of the state before
this method was called is left in Self::prev_state.
Auto Trait Implementations§
impl Freeze for Pots
impl RefUnwindSafe for Pots
impl Send for Pots
impl Sync for Pots
impl Unpin for Pots
impl UnwindSafe for Pots
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