[−][src]Struct macsmc::FanSpeed
Collection of various speeds about a single fan. If a sensor is missing, the value is 0.0
Fields
actual: Rpm
The current, actual, speed.
min: Rpm
The slowest that the fan can get.
max: Rpm
The fastest that the fan can get.
target: Rpm
The current target speed. How fast the fan should ideally be.
safe: Rpm
The slowest speed at which the fan is safe to operate. An value of 0.0 means that there is no sensor readout for this value, not that the fan could be turned off.
mode: FanMode
How the fan is currently operating.
Implementations
impl FanSpeed
[src]
pub fn percentage(&self) -> f32
[src]
The current speed represented as percentage of its max speed. The value is between 0.0 and 100.0
Examples
let fan_speed = FanSpeed { actual: Rpm(1000.0), max: Rpm(5000.0), ..FanSpeed::default() }; assert_eq!(fan_speed.percentage(), 20.0);
pub fn thresholds(&self) -> [Rpm; 4]
[src]
Speed threshold for this fan. This divides the [min, max] range into 3 equally sized segments.
Examples
let fan_speed = FanSpeed { min: Rpm(1000.0), max: Rpm(4000.0), ..FanSpeed::default() }; assert_eq!(fan_speed.thresholds(), [Rpm(1000.0), Rpm(2000.0), Rpm(3000.0), Rpm(4000.0)]);
Trait Implementations
impl Clone for FanSpeed
[src]
impl Copy for FanSpeed
[src]
impl Debug for FanSpeed
[src]
impl Default for FanSpeed
[src]
impl PartialEq<FanSpeed> for FanSpeed
[src]
impl StructuralPartialEq for FanSpeed
[src]
Auto Trait Implementations
impl RefUnwindSafe for FanSpeed
impl Send for FanSpeed
impl Sync for FanSpeed
impl Unpin for FanSpeed
impl UnwindSafe for FanSpeed
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,