pub struct Kraken { /* private fields */ }
Expand description
Representation of the Kraken device containing the underlying USB device.
Implementations§
Source§impl Kraken
impl Kraken
Sourcepub fn open() -> Result<Kraken, KrakenError>
pub fn open() -> Result<Kraken, KrakenError>
Attempts to open the Kraken device.
This will usually require superuser priviledges on the machine, and will return an error if attempted without them.
Sourcepub fn read(&self) -> Result<KrakenData, KrakenError>
pub fn read(&self) -> Result<KrakenData, KrakenError>
Reads the current state of the Kraken device.
This will populate a KrakenData
struct with the current values of the
device.
Sourcepub fn set_fan_speed(&self, fan_speed: u8) -> Result<(), KrakenError>
pub fn set_fan_speed(&self, fan_speed: u8) -> Result<(), KrakenError>
Sets the fan speed of the device.
A fan speed provided outside of the range 25-100% will result in a
FanSpeedOutOfRange
Error.
Sourcepub fn set_pump_speed(&self, pump_speed: u8) -> Result<(), KrakenError>
pub fn set_pump_speed(&self, pump_speed: u8) -> Result<(), KrakenError>
Sets the pump speed of the device.
A pump speed provided outside of the range 60-100% will result in a
PumpSpeedOutOfRange
Error.
Auto Trait Implementations§
impl Freeze for Kraken
impl RefUnwindSafe for Kraken
impl Send for Kraken
impl !Sync for Kraken
impl Unpin for Kraken
impl UnwindSafe for Kraken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more