pub mod action;
pub mod store;
pub use self::{action::Action, store::StateStore};
#[derive(Debug, Clone)]
pub struct State {
pub counter: usize,
}
impl Default for State {
fn default() -> Self {
Self { counter: 0 }
}
}
impl State {
fn upcount(&mut self) {
self.counter += 1;
}
fn downcount(&mut self) {
self.counter -= 1;
}
}