#[repr(C)]pub struct SensorReading {
pub kind: SensorKind,
pub x: f32,
pub y: f32,
pub z: f32,
pub timestamp_ms: u64,
}Expand description
One (x, y, z) sample from a motion sensor. Units depend on
SensorReading::kind (see SensorKind). All POD / Copy.
Fields§
§kind: SensorKindWhich sensor produced this reading.
x: f32X axis (device frame: right), in the kind’s unit.
y: f32Y axis (device frame: up), in the kind’s unit.
z: f32Z axis (device frame: out of screen toward user), in the kind’s unit.
timestamp_ms: u64Monotonic timestamp in milliseconds since program start.
Implementations§
Trait Implementations§
Source§impl Clone for SensorReading
impl Clone for SensorReading
Source§fn clone(&self) -> SensorReading
fn clone(&self) -> SensorReading
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SensorReading
impl Debug for SensorReading
Source§impl PartialEq for SensorReading
impl PartialEq for SensorReading
Source§fn eq(&self, other: &SensorReading) -> bool
fn eq(&self, other: &SensorReading) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SensorReading
impl StructuralPartialEq for SensorReading
Auto Trait Implementations§
impl Freeze for SensorReading
impl RefUnwindSafe for SensorReading
impl Send for SensorReading
impl Sync for SensorReading
impl Unpin for SensorReading
impl UnsafeUnpin for SensorReading
impl UnwindSafe for SensorReading
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