| 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_selectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/cfg_select!! { |
| 7 | target_os = "linux" => { |
| 8 | pub mod linuxrust-analyzer cargo bottom 0.14.9 collection/temperature/linux/; |
| 9 | pub use selfrust-analyzer cargo bottom 0.14.9 collection/temperature/::linuxrust-analyzer cargo bottom 0.14.9 collection/temperature/linux/::*; |
| 10 | } |
| 11 | _ => { |
| 12 | pub mod sysinfo; |
| 13 | pub use self::sysinfo::*; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 18 | pub struct TempSensorDatarust-analyzer cargo bottom 0.14.9 collection/temperature/TempSensorData# { |
| 19 | /// The name of the sensor. |
| 20 | pub namerust-analyzer cargo bottom 0.14.9 collection/temperature/TempSensorData#name.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 21 | |
| 22 | /// The temperature in Celsius. |
| 23 | pub temperaturerust-analyzer cargo bottom 0.14.9 collection/temperature/TempSensorData#temperature.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32>, |
| 24 | } |