Expand description
Library to query and control your Logitech Litra lights.
§Usage
use litra::Litra;
let context = Litra::new().expect("Failed to initialize litra.");
for device in context.get_connected_devices() {
println!("Device {:?}", device.device_type());
if let Ok(handle) = device.open(&context) {
println!("| - Is on: {}", handle.is_on()
.map(|on| if on { "yes" } else { "no" })
.unwrap_or("unknown"));
}
}
Structs§
- A device that can be used.
- The handle of an opened device that can be used for getting and setting the device status.
- Litra context.
Enums§
- A device-relatred error.
- The model of the device.
Type Aliases§
- The
Result
of a Litra device operation.