1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#[cfg(feature = "psvr")] mod backend_psvr;
#[cfg(feature = "psvr")] pub use self::backend_psvr::Psvr;
#[cfg(feature = "psvr")] pub use psvr;
use crate::{core::math, info, input, Error};
pub trait HeadMountedDevice {
fn product_name(&self) -> &'static str;
fn orientation(&self) -> math::Quaternion;
fn button(&self, button: input::Button) -> input::ButtonState;
fn properties(&self) -> &info::Properties;
fn update(&mut self) -> Result<(), Error>;
fn power_on(&mut self) -> Result<(), Error>;
fn power_off(&mut self) -> Result<(), Error>;
}