rust_webvr_api/vr_main_thread_heartbeat.rs
1/// Each VR service may have some code which needs to run on the main thread,
2/// for example window creation on MacOS is only supported on the main thread.
3/// Implementations of this trait will usually be neither `Sync` nor `Send`.
4pub trait VRMainThreadHeartbeat {
5 /// Run the heartbeat on the main thread.
6 fn heartbeat(&mut self);
7
8 /// Is the heartbeat expecting to be called every frame?
9 fn heart_racing(&self) -> bool;
10}