pub trait Fan: ErrorType {
// Required methods
fn max_rpm(&self) -> u16;
fn min_rpm(&self) -> u16;
fn min_start_rpm(&self) -> u16;
fn set_speed_rpm(&mut self, rpm: u16) -> Result<u16, Self::Error>;
// Provided methods
fn set_speed_percent(&mut self, percent: u8) -> Result<u16, Self::Error> { ... }
fn set_speed_max(&mut self) -> Result<(), Self::Error> { ... }
fn start(&mut self) -> Result<(), Self::Error> { ... }
fn stop(&mut self) -> Result<(), Self::Error> { ... }
}Expand description
Blocking fan methods
Required Methods§
Sourcefn min_start_rpm(&self) -> u16
fn min_start_rpm(&self) -> u16
Returns the minimum RPM needed for the fan to begin running from a dead stop (which may be the same as the minimum running speed).
Provided Methods§
Sourcefn set_speed_percent(&mut self, percent: u8) -> Result<u16, Self::Error>
fn set_speed_percent(&mut self, percent: u8) -> Result<u16, Self::Error>
Sets the fan’s speed in terms of percent of maximum RPM. Returns the actual RPM set on success.
Sourcefn set_speed_max(&mut self) -> Result<(), Self::Error>
fn set_speed_max(&mut self) -> Result<(), Self::Error>
Sets the fan’s speed to the maximum RPM it’s capable of running at.