#[non_exhaustive]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 (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.
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§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Unit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
None
: 0 bytesTempC
: 0 bytesTempF
: 0 bytesTempK
: 0 bytesLux
: 0 bytesM
: 0 bytesM2
: 0 bytesM3
: 0 bytesGForce
: 0 bytesDps
: 0 bytesGram
: 0 bytesA
: 0 bytesV
: 0 bytesW
: 0 bytesGauss
: 0 bytesT
: 0 bytesDbm
: 0 bytesCoulomb
: 0 bytesF
: 0 bytesOhm
: 0 bytesPh
: 0 bytesBar
: 0 bytesPa
: 0 bytesCd
: 0 bytesBool
: 0 bytesCts
: 0 bytesPercent
: 0 bytesPermill
: 0 bytesPpm
: 0 bytesPpb
: 0 bytesTime
: 0 bytesDate
: 0 bytesGpm3
: 0 bytesCpm3
: 0 bytes