pub struct TemperatureReading {
pub label: Box<str>,
pub celsius: f32,
pub high_celsius: Option<f32>,
pub critical_celsius: Option<f32>,
}Expand description
One temperature sensor reading.
Fields§
§label: Box<str>Sensor label, e.g. coretemp Package id 0.
celsius: f32Current temperature in degrees Celsius.
high_celsius: Option<f32>The high threshold the sensor reports, where available.
critical_celsius: Option<f32>The critical threshold the sensor reports, where available.
Implementations§
Source§impl TemperatureReading
impl TemperatureReading
Sourcepub fn is_critical(&self) -> Option<bool>
pub fn is_critical(&self) -> Option<bool>
Whether the reading is at or above the sensor’s own critical threshold.
Returns None when the sensor reports no threshold. §11.3 forbids
diagnosing thermal throttling from an ambiguous metric, so this only ever
reports what the sensor itself declares critical, and the diagnostic
engine draws no throttling conclusion from it.
Trait Implementations§
Source§impl Clone for TemperatureReading
impl Clone for TemperatureReading
Source§fn clone(&self) -> TemperatureReading
fn clone(&self) -> TemperatureReading
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemperatureReading
impl Debug for TemperatureReading
Source§impl PartialEq for TemperatureReading
impl PartialEq for TemperatureReading
impl StructuralPartialEq for TemperatureReading
Auto Trait Implementations§
impl Freeze for TemperatureReading
impl RefUnwindSafe for TemperatureReading
impl Send for TemperatureReading
impl Sync for TemperatureReading
impl Unpin for TemperatureReading
impl UnsafeUnpin for TemperatureReading
impl UnwindSafe for TemperatureReading
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