pub struct MotionEvent {
pub source: EventSource,
pub acceleration: Option<Vec3<Option<f64>>>,
pub acceleration_including_gravity: Option<Vec3<Option<f64>>>,
pub rotation_rate: Option<Rot3<Option<f64>>>,
pub interval: f64,
}
Expand description
A device motion event.
Fields§
§source: EventSource
The client identifier.
acceleration: Option<Vec3<Option<f64>>>
The acceleration in 3D space in m/s^2.
acceleration_including_gravity: Option<Vec3<Option<f64>>>
The acceleration in 3D space (including gravity) in m/s^2.
rotation_rate: Option<Rot3<Option<f64>>>
The rotation rate in deg/s on the three rotation axes.
interval: f64
The granularity of these events in ms.
Trait Implementations§
Source§impl Clone for MotionEvent
impl Clone for MotionEvent
Source§fn clone(&self) -> MotionEvent
fn clone(&self) -> MotionEvent
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 MotionEvent
impl Debug for MotionEvent
Source§impl<'de> Deserialize<'de> for MotionEvent
impl<'de> Deserialize<'de> for MotionEvent
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 MotionEvent
impl PartialEq for MotionEvent
Source§impl Serialize for MotionEvent
impl Serialize for MotionEvent
impl StructuralPartialEq for MotionEvent
Auto Trait Implementations§
impl Freeze for MotionEvent
impl RefUnwindSafe for MotionEvent
impl Send for MotionEvent
impl Sync for MotionEvent
impl Unpin for MotionEvent
impl UnwindSafe for MotionEvent
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