Debian Codegraph @

src/collection/temperature.rs

raw symbols SCIP
1 //! Data collection for temperature metrics.
2 //!
3 //! For Linux, this is handled by custom code.
4 //! For everything else, this is handled by sysinfo.
5
6 cfg_select! {
7 target_os = "linux" => {
8 pub mod linux;
9 pub use self::linux::*;
10 }
11 _ => {
12 pub mod sysinfo;
13 pub use self::sysinfo::*;
14 }
15 }
16
17 #[derive(Default, Debug, Clone)]
18 pub struct TempSensorData {
19 /// The name of the sensor.
20 pub name: String,
21
22 /// The temperature in Celsius.
23 pub temperature: Option<f32>,
24 }