pub enum DeviceClass {
Show 28 variants
None,
AirQualityIndex,
Battery,
CarbonDioxide,
CarbonMonoxide,
Current,
Date,
Energy,
Gas,
Humidity,
Illuminance,
Monetary,
NitrogenDioxide,
NitrogenMonoxide,
NitrousOxide,
Ozone,
Pm1,
Pm10,
Pm25,
PowerFactor,
Power,
Pressure,
SignalStrength,
SulphurDioxide,
Temperature,
Timestamp,
VolatileOrganicCompounds,
Voltage,
}
Expand description
The type of data a sensor returns impacts how it is displayed in the frontend.
Variants§
None
Generic sensor. This is the default and doesn’t need to be set.
AirQualityIndex
Air Quality Index.
Battery
Percentage of battery that is left.
CarbonDioxide
Carbon Dioxide in CO2 (Smoke)
CarbonMonoxide
Carbon Monoxide in CO (Gas CNG/LPG)
Current
Current in A.
Date
Date string (ISO 8601).
Energy
Energy in Wh or kWh.
Gas
Gasvolume in m³ or ft³.
Humidity
Percentage of humidity in the air.
Illuminance
The current light level in lx or lm.
Monetary
The monetary value.
NitrogenDioxide
Concentration of Nitrogen Dioxide in µg/m³
NitrogenMonoxide
Concentration of Nitrogen Monoxide in µg/m³
NitrousOxide
Concentration of Nitrous Oxide in µg/m³
Ozone
Concentration of Ozone in µg/m³
Pm1
Concentration of particulate matter less than 1 micrometer in µg/m³
Pm10
Concentration of particulate matter less than 10 micrometers in µg/m³
Pm25
Concentration of particulate matter less than 2.5 micrometers in µg/m³
PowerFactor
Power factor in %.
Power
Power in W or kW.
Pressure
Pressure in hPa or mbar.
SignalStrength
Signal strength in dB or dBm.
SulphurDioxide
Concentration of sulphur dioxide in µg/m³
Temperature
Temperature in °C or °F.
Timestamp
Datetime object or timestamp string (ISO 8601).
VolatileOrganicCompounds
Concentration of volatile organic compounds in µg/m³.
Voltage
Voltage in V.
Implementations§
Trait Implementations§
source§impl Clone for DeviceClass
impl Clone for DeviceClass
source§fn clone(&self) -> DeviceClass
fn clone(&self) -> DeviceClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DeviceClass
impl Debug for DeviceClass
source§impl Default for DeviceClass
impl Default for DeviceClass
source§impl<'de> Deserialize<'de> for DeviceClass
impl<'de> Deserialize<'de> for DeviceClass
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for DeviceClass
impl Hash for DeviceClass
source§impl Ord for DeviceClass
impl Ord for DeviceClass
source§fn cmp(&self, other: &DeviceClass) -> Ordering
fn cmp(&self, other: &DeviceClass) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<DeviceClass> for DeviceClass
impl PartialEq<DeviceClass> for DeviceClass
source§fn eq(&self, other: &DeviceClass) -> bool
fn eq(&self, other: &DeviceClass) -> bool
source§impl PartialOrd<DeviceClass> for DeviceClass
impl PartialOrd<DeviceClass> for DeviceClass
source§fn partial_cmp(&self, other: &DeviceClass) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceClass) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DeviceClass
impl Serialize for DeviceClass
impl Copy for DeviceClass
impl Eq for DeviceClass
impl StructuralEq for DeviceClass
impl StructuralPartialEq for DeviceClass
Auto Trait Implementations§
impl RefUnwindSafe for DeviceClass
impl Send for DeviceClass
impl Sync for DeviceClass
impl Unpin for DeviceClass
impl UnwindSafe for DeviceClass
Blanket Implementations§
source§impl<T, V> IntoValidated<V> for Twhere
V: ValidatedFrom<T>,
impl<T, V> IntoValidated<V> for Twhere
V: ValidatedFrom<T>,
source§fn into_validated(
self
) -> Result<Validated<V>, (V, Context<<V as Validate>::Invalidity>)>
fn into_validated(
self
) -> Result<Validated<V>, (V, Context<<V as Validate>::Invalidity>)>
self
into output value and validate the output Read more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more