#[repr(C)]pub enum SensorKind {
Accelerometer = 0,
Gyroscope = 1,
Magnetometer = 2,
}Expand description
Which motion sensor a SensorReading came from.
Variants§
Accelerometer = 0
Linear acceleration including gravity, in m/s²
(iOS CMAccelerometerData ×9.80665, Android TYPE_ACCELEROMETER).
Gyroscope = 1
Angular velocity, in rad/s (iOS CMGyroData, Android
TYPE_GYROSCOPE).
Magnetometer = 2
Geomagnetic field, in µT (iOS magneticField, Android
TYPE_MAGNETIC_FIELD).
Trait Implementations§
Source§impl Clone for SensorKind
impl Clone for SensorKind
Source§fn clone(&self) -> SensorKind
fn clone(&self) -> SensorKind
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 SensorKind
impl Debug for SensorKind
Source§impl Hash for SensorKind
impl Hash for SensorKind
Source§impl Ord for SensorKind
impl Ord for SensorKind
Source§fn cmp(&self, other: &SensorKind) -> Ordering
fn cmp(&self, other: &SensorKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SensorKind
impl PartialEq for SensorKind
Source§fn eq(&self, other: &SensorKind) -> bool
fn eq(&self, other: &SensorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SensorKind
impl PartialOrd for SensorKind
impl Copy for SensorKind
impl Eq for SensorKind
impl StructuralPartialEq for SensorKind
Auto Trait Implementations§
impl Freeze for SensorKind
impl RefUnwindSafe for SensorKind
impl Send for SensorKind
impl Sync for SensorKind
impl Unpin for SensorKind
impl UnsafeUnpin for SensorKind
impl UnwindSafe for SensorKind
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