INNER CODE UNIT · Rust
default
lemunozm/ruscii · src/app.rs:33
fn default() -> Self {
Self { fps: 30 }
}
}
/// Contains the run state of the the [`App`] and the [`Keyboard`] through [`State::keyboard`] for
/// the key event interface.
#[derive(Default)]
pub struct State {
running: Arc<AtomicBool>,
keyboard: Keyboard,
pub(self) dt: time::Duration,
pub(self) step: usize,
}
impl State {
pub fn run(&self) {
self.running.store(true, Ordering::SeqCst);