[−][src]Trait libmedium::hwmon::Hwmon
Base trait that all hwmon must implement.
Associated Types
type Current: CurrSensor
The type of current sensor this Hwmon
supports.
type Energy: EnergySensor
The type of energy sensor this Hwmon
supports.
type Fan: FanSensor
The type of fan sensor this Hwmon
supports.
type Humidity: HumiditySensor
The type of humidity sensor this Hwmon
supports.
type Power: PowerSensor
The type of power sensor this Hwmon
supports.
type Pwm: PwmSensor
The type of pwm sensor this Hwmon
supports.
type Temp: TempSensor
The type of temp sensor this Hwmon
supports.
type Voltage: VoltSensor
The type of voltage sensor this Hwmon
supports.
Required methods
fn name(&self) -> &str
Returns the hwmon's name.
fn path(&self) -> &Path
Returns the hwmon's path.
fn currents(&self) -> &BTreeMap<u16, Self::Current>
Returns all current sensors found in this Hwmon
.
fn energies(&self) -> &BTreeMap<u16, Self::Energy>
Returns all energy sensors found in this Hwmon
.
fn fans(&self) -> &BTreeMap<u16, Self::Fan>
Returns all fan sensors found in this Hwmon
.
fn humidities(&self) -> &BTreeMap<u16, Self::Humidity>
Returns all humidity sensors found in this Hwmon
.
fn powers(&self) -> &BTreeMap<u16, Self::Power>
Returns all power sensors found in this Hwmon
.
fn pwms(&self) -> &BTreeMap<u16, Self::Pwm>
Returns all pwm sensors found in this Hwmon
.
fn temps(&self) -> &BTreeMap<u16, Self::Temp>
Returns all temp sensors found in this Hwmon
.
fn voltages(&self) -> &BTreeMap<u16, Self::Voltage>
Returns all voltage sensors found in this Hwmon
.
Provided methods
fn device_path(&self) -> PathBuf
Returns this hwmon's device path. This path does not change between reboots.
fn current(&self, index: u16) -> Option<&Self::Current>
Returns the current sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn energy(&self, index: u16) -> Option<&Self::Energy>
Returns the energy sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn fan(&self, index: u16) -> Option<&Self::Fan>
Returns the fan sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn humidity(&self, index: u16) -> Option<&Self::Humidity>
Returns the humidity sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn power(&self, index: u16) -> Option<&Self::Power>
Returns the power sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn pwm(&self, index: u16) -> Option<&Self::Pwm>
Returns the pwm sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn temp(&self, index: u16) -> Option<&Self::Temp>
Returns the temp sensor with the given index.
Returns None
, if no sensor with the given index exists.
fn voltage(&self, index: u16) -> Option<&Self::Voltage>
Returns the voltage sensor with the given index.
Returns None
, if no sensor with the given index exists.