Struct omnisensor::sysfs::SysfsSensorIO
source · [−]Expand description
Information for reading sensor data from sysfs.
Fields
fd: File
A file descriptor to (asynchronously) read from.
scale: f64
A multiplicative scale factor to convert raw sysfs file data to the desired units.
For example, the hwmon subsystem provides temperature readings in millidegrees C, so 0.001 here would convert that to degrees C as desired elsewhere.
Implementations
sourceimpl SysfsSensorIO
impl SysfsSensorIO
sourcepub async fn new(file: &HwmonFileInfo) -> Result<Self, Box<dyn Error>>
pub async fn new(file: &HwmonFileInfo) -> Result<Self, Box<dyn Error>>
Construct a SysfsSensorIO
for a provided hwmon file.
For use with SensorIO::Sysfs
.
Auto Trait Implementations
impl !RefUnwindSafe for SysfsSensorIO
impl Send for SysfsSensorIO
impl Sync for SysfsSensorIO
impl Unpin for SysfsSensorIO
impl !UnwindSafe for SysfsSensorIO
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more