[][src]Trait libmedium::hwmon::Hwmon

pub trait Hwmon {
    type Current: CurrSensor;
    type Energy: EnergySensor;
    type Fan: FanSensor;
    type Humidity: HumiditySensor;
    type Power: PowerSensor;
    type Pwm: PwmSensor;
    type Temp: TempSensor;
    type Voltage: VoltSensor;
    fn name(&self) -> &str;
fn path(&self) -> &Path;
fn currents(&self) -> &BTreeMap<u16, Self::Current>;
fn energies(&self) -> &BTreeMap<u16, Self::Energy>;
fn fans(&self) -> &BTreeMap<u16, Self::Fan>;
fn humidities(&self) -> &BTreeMap<u16, Self::Humidity>;
fn powers(&self) -> &BTreeMap<u16, Self::Power>;
fn pwms(&self) -> &BTreeMap<u16, Self::Pwm>;
fn temps(&self) -> &BTreeMap<u16, Self::Temp>;
fn voltages(&self) -> &BTreeMap<u16, Self::Voltage>; fn current(&self, index: u16) -> Option<&Self::Current> { ... }
fn energy(&self, index: u16) -> Option<&Self::Energy> { ... }
fn fan(&self, index: u16) -> Option<&Self::Fan> { ... }
fn humidity(&self, index: u16) -> Option<&Self::Humidity> { ... }
fn power(&self, index: u16) -> Option<&Self::Power> { ... }
fn pwm(&self, index: u16) -> Option<&Self::Pwm> { ... }
fn temp(&self, index: u16) -> Option<&Self::Temp> { ... }
fn voltage(&self, index: u16) -> Option<&Self::Voltage> { ... } }

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.

Loading content...

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.

Loading content...

Provided methods

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.

Loading content...

Implementors

impl Hwmon for ReadOnlyHwmon[src]

type Current = ReadOnlyCurr

type Energy = ReadOnlyEnergy

type Fan = ReadOnlyFan

type Humidity = ReadOnlyHumidity

type Power = ReadOnlyPower

type Pwm = ReadOnlyPwm

type Temp = ReadOnlyTemp

type Voltage = ReadOnlyVolt

impl Hwmon for ReadWriteHwmon[src]

type Current = ReadWriteCurr

type Energy = ReadWriteEnergy

type Fan = ReadWriteFan

type Humidity = ReadWriteHumidity

type Power = ReadWritePower

type Pwm = ReadWritePwm

type Temp = ReadWriteTemp

type Voltage = ReadWriteVolt

Loading content...