Kind

Enum Kind 

Source
#[non_exhaustive]
#[repr(u32)]
pub enum Kind {
Show 87 variants VoltageInput = 0, VoltageMinimum = 1, VoltageMaximum = 2, VoltageLCritical = 3, VoltageCritical = 4, VoltageAverage = 5, VoltageLowest = 6, VoltageHighest = 7, VoltageAlarm = 128, VoltageMinimumAlarm = 129, VoltageMaximumAlarm = 130, VoltageBeep = 131, VoltageLCriticalAlarm = 132, VoltageCriticalAlarm = 133, FanInput = 256, FanMinimum = 257, FanMaximum = 258, FanAlarm = 384, FanFault = 385, FanDivisor = 386, FanBeep = 387, FanPulses = 388, FanMinimumAlarm = 389, FanMaximumAlarm = 390, TemperatureInput = 512, TemperatureMaximum = 513, TemperatureMaximumHysteresis = 514, TemperatureMinimum = 515, TemperatureCritical = 516, TemperatureCriticalHysteresis = 517, TemperatureLCritical = 518, TemperatureEmergency = 519, TemperatureEmergencyHysteresis = 520, TemperatureLowest = 521, TemperatureHighest = 522, TemperatureMinimumHysteresis = 523, TemperatureLCriticalHysteresis = 524, TemperatureAlarm = 640, TemperatureMaximumAlarm = 641, TemperatureMinimumAlarm = 642, TemperatureCriticalAlarm = 643, TemperatureFault = 644, TemperatureType = 645, TemperatureOffset = 646, TemperatureBeep = 647, TemperatureEmergencyAlarm = 648, TemperatureLCriticalAlarm = 649, PowerAverage = 768, PowerAverageHighest = 769, PowerAverageLowest = 770, PowerInput = 771, PowerInputHighest = 772, PowerInputLowest = 773, PowerCap = 774, PowerCapHysteresis = 775, PowerMaximum = 776, PowerCritical = 777, PowerMinimum = 778, PowerLCritical = 779, PowerAverageInterval = 896, PowerAlarm = 897, PowerCapAlarm = 898, PowerMaximumAlarm = 899, PowerCriticalAlarm = 900, PowerMinimumAlarm = 901, PowerLCriticalAlarm = 902, EnergyInput = 1_024, CurrentInput = 1_280, CurrentMinimum = 1_281, CurrentMaximum = 1_282, CurrentLCritical = 1_283, CurrentCritical = 1_284, CurrentAverage = 1_285, CurrentLowest = 1_286, CurrentHighest = 1_287, CurrentAlarm = 1_408, CurrentMinimumAlarm = 1_409, CurrentMaximumAlarm = 1_410, CurrentBeep = 1_411, CurrentLCriticalAlarm = 1_412, CurrentCriticalAlarm = 1_413, HumidityInput = 1_536, VoltageID = 4_096, IntrusionAlarm = 4_352, IntrusionBeep = 4_353, BeepEnable = 6_144, Unknown = 2_147_483_647,
}
Expand description

Type of the value of a sensor or actuator.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

VoltageInput = 0

§

VoltageMinimum = 1

§

VoltageMaximum = 2

§

VoltageLCritical = 3

§

VoltageCritical = 4

§

VoltageAverage = 5

§

VoltageLowest = 6

§

VoltageHighest = 7

§

VoltageAlarm = 128

§

VoltageMinimumAlarm = 129

§

VoltageMaximumAlarm = 130

§

VoltageBeep = 131

§

VoltageLCriticalAlarm = 132

§

VoltageCriticalAlarm = 133

§

FanInput = 256

§

FanMinimum = 257

§

FanMaximum = 258

§

FanAlarm = 384

§

FanFault = 385

§

FanDivisor = 386

§

FanBeep = 387

§

FanPulses = 388

§

FanMinimumAlarm = 389

§

FanMaximumAlarm = 390

§

TemperatureInput = 512

§

TemperatureMaximum = 513

§

TemperatureMaximumHysteresis = 514

§

TemperatureMinimum = 515

§

TemperatureCritical = 516

§

TemperatureCriticalHysteresis = 517

§

TemperatureLCritical = 518

§

TemperatureEmergency = 519

§

TemperatureEmergencyHysteresis = 520

§

TemperatureLowest = 521

§

TemperatureHighest = 522

§

TemperatureMinimumHysteresis = 523

§

TemperatureLCriticalHysteresis = 524

§

TemperatureAlarm = 640

§

TemperatureMaximumAlarm = 641

§

TemperatureMinimumAlarm = 642

§

TemperatureCriticalAlarm = 643

§

TemperatureFault = 644

§

TemperatureType = 645

§

TemperatureOffset = 646

§

TemperatureBeep = 647

§

TemperatureEmergencyAlarm = 648

§

TemperatureLCriticalAlarm = 649

§

PowerAverage = 768

§

PowerAverageHighest = 769

§

PowerAverageLowest = 770

§

PowerInput = 771

§

PowerInputHighest = 772

§

PowerInputLowest = 773

§

PowerCap = 774

§

PowerCapHysteresis = 775

§

PowerMaximum = 776

§

PowerCritical = 777

§

PowerMinimum = 778

§

PowerLCritical = 779

§

PowerAverageInterval = 896

§

PowerAlarm = 897

§

PowerCapAlarm = 898

§

PowerMaximumAlarm = 899

§

PowerCriticalAlarm = 900

§

PowerMinimumAlarm = 901

§

PowerLCriticalAlarm = 902

§

EnergyInput = 1_024

§

CurrentInput = 1_280

§

CurrentMinimum = 1_281

§

CurrentMaximum = 1_282

§

CurrentLCritical = 1_283

§

CurrentCritical = 1_284

§

CurrentAverage = 1_285

§

CurrentLowest = 1_286

§

CurrentHighest = 1_287

§

CurrentAlarm = 1_408

§

CurrentMinimumAlarm = 1_409

§

CurrentMaximumAlarm = 1_410

§

CurrentBeep = 1_411

§

CurrentLCriticalAlarm = 1_412

§

CurrentCriticalAlarm = 1_413

§

HumidityInput = 1_536

§

VoltageID = 4_096

§

IntrusionAlarm = 4_352

§

IntrusionBeep = 4_353

§

BeepEnable = 6_144

§

Unknown = 2_147_483_647

Implementations§

Source§

impl Kind

Source

pub fn from_raw(kind: c_uint) -> Option<Self>

Return an instance from one of the SENSORS_SUBFEATURE_* values, e.g., SENSORS_SUBFEATURE_TEMP_INPUT.

Source

pub fn as_raw(self) -> c_uint

Return one of the SENSORS_SUBFEATURE_* values (e.g., SENSORS_SUBFEATURE_TEMP_INPUT) equivalent to this instance.

Source

pub fn unit(self) -> Unit

Return the measurement unit of this instance.

Trait Implementations§

Source§

impl Clone for Kind

Source§

fn clone(&self) -> Kind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Kind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Kind

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Kind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Kind> for u32

Source§

fn from(enum_value: Kind) -> Self

Converts to this type from the input type.
Source§

impl Ord for Kind

Source§

fn cmp(&self, other: &Kind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Kind

Source§

fn eq(&self, other: &Kind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Kind

Source§

fn partial_cmp(&self, other: &Kind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<u32> for Kind

Source§

type Error = TryFromPrimitiveError<Kind>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for Kind

Source§

impl Copy for Kind

Source§

impl Eq for Kind

Source§

impl StructuralPartialEq for Kind

Auto Trait Implementations§

§

impl Freeze for Kind

§

impl RefUnwindSafe for Kind

§

impl Send for Kind

§

impl Sync for Kind

§

impl Unpin for Kind

§

impl UnwindSafe for Kind

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.