Enum MeasurementUnit
#[non_exhaustive]pub enum MeasurementUnit {
Show 38 variants
AccelG,
Ampere,
Becquerel,
Bool,
Candela,
Celsius,
Coulomb,
Decibel,
DecimalDegree,
Degree,
DegreePerSecond,
Farad,
Gram,
Gray,
Henry,
Hertz,
Joule,
Katal,
Kelvin,
Lumen,
Lux,
Meter,
MeterPerSecond,
Mole,
Newton,
Ohm,
Pascal,
Percent,
PercentageRelativeHumidity,
Radian,
Second,
Siemens,
Sievert,
Steradian,
Tesla,
Volt,
Watt,
Weber,
}Available on crate feature
sensors only.Expand description
Represents a unit of measurement.
§For sensor driver implementors
Missing variants can be added when required. Please open an issue to discuss it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AccelG
Ampere
Ampere (A).
Becquerel
Becquerel (Bq).
Bool
Logic boolean: 0 means false and 1 means true.
Candela
Candela (cd).
Celsius
Degrees Celsius (°C).
Coulomb
Coulomb (C).
Decibel
Decibel (dB).
DecimalDegree
Decimal degrees (°).
Degree
Degrees (°).
DegreePerSecond
Degrees per second (°/s).
Farad
Farad (F).
Gram
Gram (g).
Gray
Gray (Gy).
Henry
Henry (H).
Hertz
Hertz (Hz).
Joule
Joule (J).
Katal
Katal (kat).
Kelvin
Kelvin (K).
Lumen
Lumen (lm).
Lux
Lux (lx).
Meter
Meter (m).
MeterPerSecond
Meter per second (m/s).
Mole
Mole (mol).
Newton
Newton (N).
Ohm
Ohm (Ω).
Pascal
Pascal (Pa).
Percent
Percent (%).
PercentageRelativeHumidity
%RH.
Radian
Radian (rad).
Second
Second (s).
Siemens
Siemens (S).
Sievert
Sievert (Sv).
Steradian
Steradian (sr).
Tesla
Tesla (T).
Volt
Volt (V).
Watt
Watt (W).
Weber
Weber (Wb).
Trait Implementations§
§impl Clone for MeasurementUnit
impl Clone for MeasurementUnit
§fn clone(&self) -> MeasurementUnit
fn clone(&self) -> MeasurementUnit
Returns a duplicate 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 more§impl Debug for MeasurementUnit
impl Debug for MeasurementUnit
§impl Display for MeasurementUnit
impl Display for MeasurementUnit
§impl Format for MeasurementUnit
Available on crate feature defmt only.
impl Format for MeasurementUnit
Available on crate feature
defmt only.§impl PartialEq for MeasurementUnit
impl PartialEq for MeasurementUnit
impl Copy for MeasurementUnit
impl Eq for MeasurementUnit
impl StructuralPartialEq for MeasurementUnit
Auto Trait Implementations§
impl Freeze for MeasurementUnit
impl RefUnwindSafe for MeasurementUnit
impl Send for MeasurementUnit
impl Sync for MeasurementUnit
impl Unpin for MeasurementUnit
impl UnwindSafe for MeasurementUnit
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