pub struct SysfsSensor { /* private fields */ }Expand description
Sensor that reads a single value from a /sys filesystem path.
Common uses:
/sys/class/thermal/thermal_zone0/temp(temperature in millidegrees)/sys/class/hwmon/hwmon0/fan1_input(fan RPM)/sys/class/power_supply/BAT0/capacity(battery percentage)
The scale field divides the raw integer value (e.g., 55000 → 55.0
for millidegrees → degrees).
Implementations§
Source§impl SysfsSensor
impl SysfsSensor
Trait Implementations§
Source§impl Debug for SysfsSensor
impl Debug for SysfsSensor
Source§impl SensorDevice for SysfsSensor
impl SensorDevice for SysfsSensor
Auto Trait Implementations§
impl Freeze for SysfsSensor
impl RefUnwindSafe for SysfsSensor
impl Send for SysfsSensor
impl Sync for SysfsSensor
impl Unpin for SysfsSensor
impl UnsafeUnpin for SysfsSensor
impl UnwindSafe for SysfsSensor
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