Enum riot_wrappers::saul::Unit
source · pub enum Unit {
Show 34 variants
None,
TempC,
TempF,
TempK,
Lux,
M,
M2,
M3,
GForce,
Dps,
Gram,
A,
V,
W,
Gauss,
T,
Dbm,
Coulomb,
F,
Ohm,
Ph,
Bar,
Pa,
Cd,
Bool,
Cts,
Percent,
Permill,
Ppm,
Ppb,
Time,
Date,
Gpm3,
Cpm3,
}
Available on
riot_module_saul
only.Expand description
Unit of measurement required to interpret numeric values in a Phydat exchanged with a SAUL device
Variants§
None
Note that this means “data has no physical unit”, and is distinct from “No unit given”,
which is Option::<Unit>::None
as opposed to Some(Unit::None)
.
TempC
TempF
TempK
Lux
M
M2
M3
GForce
Dps
Gram
A
V
W
Gauss
T
Dbm
Coulomb
F
Ohm
Ph
Bar
Pa
Cd
Bool
Cts
Percent
Permill
Ppm
Ppb
Time
Date
Gpm3
Cpm3
Implementations§
source§impl Unit
impl Unit
pub const G: Self = Unit::GForce
👎Deprecated: Use the GForce variant instead
pub const Gr: Self = Unit::Gram
👎Deprecated: Use the Gram variant instead
pub const Gs: Self = Unit::Gauss
👎Deprecated: Use the Gauss variant instead
sourcepub fn name_verbose(self) -> Option<&'static str>
pub fn name_verbose(self) -> Option<&'static str>
Like .name()
, but with additional names like “none” or “time”.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
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