pub struct Sensor {
pub index: usize,
pub identifier: String,
pub name: String,
pub ty: SensorType,
pub value: f32,
}Expand description
Instance of a sensor
Fields§
§index: usizeCache index of the sensor
identifier: StringUnique identifier for the hardware
name: StringName of the sensor
ty: SensorTypeType of the sensor
value: f32Value of the sensor will be NaN when the sensor has no value
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sensor
impl<'de> Deserialize<'de> for Sensor
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Sensor
impl RefUnwindSafe for Sensor
impl Send for Sensor
impl Sync for Sensor
impl Unpin for Sensor
impl UnsafeUnpin for Sensor
impl UnwindSafe for Sensor
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