Struct roccat_vulcan_api_rs::KeyboardApi[][src]

pub struct KeyboardApi { /* fields omitted */ }
Expand description

Main API

Implementations

Look for the default configuration

Errors

Initialize the API by seraching for a keyboard matching an ellement of a list.

Errors

see Self::new

Initialize the API uing from a interface info.

Errors

see Self::new

Renders a collor buffer

Errors

ErrorRoccatVulcanApi::LedDeviceError if the lead device encountered an error

read key press for a time of at least duration and return a vector of the keypress that occured for this duration.

Errors

Example

use std::time::Duration;

use roccat_vulcan_api_rs::{ErrorRoccatVulcanApi, KeyboardApi};

let keyboard = KeyboardApi::new()?;
let result = keyboard.read_key_press(Duration::from_millis(400))?;
println!("{:?}", result);

Block the thread until a key event or an error occur

Errors

ErrorRoccatVulcanApi::ReadDeviceError when the read device has an error

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.