Enum omnisensor::sensor::SensorConfig
source · [−]pub enum SensorConfig {
Hwmon(HwmonSensorConfig),
ADC(ADCSensorConfig),
Fan(FanSensorConfig),
PECI(PECISensorConfig),
External(ExternalSensorConfig),
}
Expand description
An enum of config data all supported sensor types.
Variants
Hwmon(HwmonSensorConfig)
ADC(ADCSensorConfig)
Fan(FanSensorConfig)
PECI(PECISensorConfig)
External(ExternalSensorConfig)
Implementations
sourceimpl SensorConfig
impl SensorConfig
sourcepub fn from_dbus(
props: &PropMap,
intf: &str,
all_intfs: &HashMap<String, PropMap>
) -> Option<Result<Self, Box<dyn Error>>>
pub fn from_dbus(
props: &PropMap,
intf: &str,
all_intfs: &HashMap<String, PropMap>
) -> Option<Result<Self, Box<dyn Error>>>
Construct a SensorConfig
from dbus properties props
props
should be the entry for intf
in all_intfs
.
Returns:
Some(Ok(_))
: successful parse.Some(Err(_))
: we tried to parse a config, but something was wrong with it.None
:intf
isn’t a sensor configuration, no attempt at parsing.
Auto Trait Implementations
impl RefUnwindSafe for SensorConfig
impl Send for SensorConfig
impl Sync for SensorConfig
impl Unpin for SensorConfig
impl UnwindSafe for SensorConfig
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