pub struct OrientationEvent {
pub source: EventSource,
pub absolute: Option<bool>,
pub alpha: Option<f64>,
pub beta: Option<f64>,
pub gamma: Option<f64>,
}
Expand description
A device orientation event.
Fields§
§source: EventSource
The client identifier.
absolute: Option<bool>
Whether the device provides absolute orientation data.
alpha: Option<f64>
The motion of the device around the z-axis, in degrees from 0 (inclusive) to 360 (exclusive).
beta: Option<f64>
The motion of the device around the x-axis (front to back motion), in degrees from -180 (inclusive) to 180 (exclusive).
gamma: Option<f64>
The motion of the device around the y-axis (left to right motion), in degrees from -90 (inclusive) to 90 (exclusive).
Implementations§
Trait Implementations§
Source§impl Clone for OrientationEvent
impl Clone for OrientationEvent
Source§fn clone(&self) -> OrientationEvent
fn clone(&self) -> OrientationEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OrientationEvent
impl Debug for OrientationEvent
Source§impl<'de> Deserialize<'de> for OrientationEvent
impl<'de> Deserialize<'de> for OrientationEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OrientationEvent
impl PartialEq for OrientationEvent
Source§impl Serialize for OrientationEvent
impl Serialize for OrientationEvent
impl StructuralPartialEq for OrientationEvent
Auto Trait Implementations§
impl Freeze for OrientationEvent
impl RefUnwindSafe for OrientationEvent
impl Send for OrientationEvent
impl Sync for OrientationEvent
impl Unpin for OrientationEvent
impl UnwindSafe for OrientationEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more