[−][src]Struct kraken_rs::Kraken
Representation of the Kraken device containing the underlying USB device.
Methods
impl Kraken
[src]
pub fn open() -> Result<Kraken, KrakenError>
[src]
Attempts to open the Kraken device.
This will usually require superuser priviledges on the machine, and will return an error if attempted without them.
pub fn read(&self) -> Result<KrakenData, KrakenError>
[src]
Reads the current state of the Kraken device.
This will populate a KrakenData
struct with the current values of the
device.
pub fn set_fan_speed(&self, fan_speed: u8) -> Result<(), KrakenError>
[src]
Sets the fan speed of the device.
A fan speed provided outside of the range 25-100% will result in a
FanSpeedOutOfRange
Error.
pub fn set_pump_speed(&self, pump_speed: u8) -> Result<(), KrakenError>
[src]
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 RefUnwindSafe for Kraken
impl Send for Kraken
impl !Sync for Kraken
impl Unpin for Kraken
impl UnwindSafe for Kraken
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, 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>,