Trait VRMainThreadHeartbeat

Source
pub trait VRMainThreadHeartbeat {
    // Required methods
    fn heartbeat(&mut self);
    fn heart_racing(&self) -> bool;
}
Expand description

Each VR service may have some code which needs to run on the main thread, for example window creation on MacOS is only supported on the main thread. Implementations of this trait will usually be neither Sync nor Send.

Required Methods§

Source

fn heartbeat(&mut self)

Run the heartbeat on the main thread.

Source

fn heart_racing(&self) -> bool

Is the heartbeat expecting to be called every frame?

Implementors§