#[repr(C)]pub enum DistanceUnit {
Millimeters = 0,
Centimeters = 1,
Meters = 2,
}Expand description
The length unit of a ProximityDistance - the sensor’s NATIVE unit,
kept rather than converted so no precision is invented: Windows reports
millimetres, Android centimetres, Linux iio metres.
Variants§
Trait Implementations§
Source§impl Clone for DistanceUnit
impl Clone for DistanceUnit
Source§fn clone(&self) -> DistanceUnit
fn clone(&self) -> DistanceUnit
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 moreimpl Copy for DistanceUnit
Source§impl Debug for DistanceUnit
impl Debug for DistanceUnit
impl Eq for DistanceUnit
Source§impl Hash for DistanceUnit
impl Hash for DistanceUnit
Source§impl Ord for DistanceUnit
impl Ord for DistanceUnit
Source§fn cmp(&self, other: &DistanceUnit) -> Ordering
fn cmp(&self, other: &DistanceUnit) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DistanceUnit
impl PartialEq for DistanceUnit
Source§impl PartialOrd for DistanceUnit
impl PartialOrd for DistanceUnit
impl StructuralPartialEq for DistanceUnit
Auto Trait Implementations§
impl Freeze for DistanceUnit
impl RefUnwindSafe for DistanceUnit
impl Send for DistanceUnit
impl Sync for DistanceUnit
impl Unpin for DistanceUnit
impl UnsafeUnpin for DistanceUnit
impl UnwindSafe for DistanceUnit
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