winit/src/platform_impl/web/event_loop/state.rs
Kirill Chibisov 7b0c7b6cb2
chore(rustfmt): use nightly (#2325)
Stable rustfmt lacks a lot of features resulting in worse formatted
code, thus use nightly formatter.
2024-04-26 17:11:44 +02:00

18 lines
343 B
Rust

use super::backend;
use web_time::Instant;
#[derive(Debug)]
pub enum State {
Init,
WaitUntil { _timeout: backend::Schedule, start: Instant, end: Instant },
Wait { start: Instant },
Poll { _request: backend::Schedule },
Exit,
}
impl State {
pub fn exiting(&self) -> bool {
matches!(self, State::Exit)
}
}