Expand description
Client library for OpenRGB SDK server.
This client is async and requires a tokio runtime to run.
§Example
use openrgb2::{OpenRgbResult, OpenRgbClient};
#[tokio::main]
async fn main() -> OpenRgbResult<()> {
// connect to default server at localhost
let client = OpenRgbClient::connect().await?;
let controllers = client.get_all_controllers().await?;
controllers.init().await?;
Ok(())
}This crates provides the OpenRgbClient and Controller structs.
The client is used to connect to the OpenRGB server and retrieve Controllers,
after which RGB control can be done using the Controller.
See examples, and OpenRgbClient for client API.
Macros§
- impl_
enum_ discriminant - Implements traits for C-style enums with discriminants. Following traits are implemented:
- log_
serde - Macro to log (de)serialisation. Enabled only when debugging.
Structs§
- Auto
Start Settings - Settings related to when and how
OpenRGBautomatically starts - Autoload
Profile - A profile that should be automatically loaded
- Command
- A command to update the LEDs in a controller.
Commands must be executed using
[Self::execute()]. Use[Controller::cmd()]to create a command. - Command
Group Commandequivalent for aControllerGroup, which allow you to update multiple controllers.- Controller
- An
RGBController, which represents a single RGB device that can be controlled. - Controller
Group - A group of controllers, this is used to manage multiple controllers at once.
- Controller
Mode - Mode of a controller.
- Controller
Mode Builder - Builder for a controller mode.
- Detector
Settings - Detection related settings
- FlagSet
- HidDevice
Data - I2cSmbus
Interface - Led
- A single LED of a controller
- LedData
- A single LED.
- LogEntry
- LogManager
Settings - Settings for the
LogManagerinOpenRGB - Matrix
MapData - Should be followed by a
- Mode
Data - RGB controller mode.
- Open
RgbClient - Client for the
OpenRGBSDK server that provides methods to interact withOpenRGB. - Plugin
Data - Data for
OpenRGBplugins. - Profile
Data - Data in Profile JSON
- Profile
Manager Settings - Settings for the
ProfileManagerinOpenRGB - RawDevice
Info List - Holds a list of “raw” I2C, HID or USB devices
- Segment
- A segment in a zone, which can contain multiple LEDs.
- Segment
Data - Data for
OpenRGBsegments - Serial
Port Data - Server
Settings - SDK server related settings
- Settings
Schema - Settings schema returned by
GetSettingsSchemapacket - Settings
Schema Entry - Entry for a setting in a
SettingsSchema - UiSettings
- User Interface settings for
OpenRGB - UsbDevice
Data - Window
Geometry - Window Geometry of
OpenRGBwindow - Zone
- A zone in a controller, which contains one or more LEDs.
Enums§
- Client
Flags - Client flags
- Color
Mode - RGB controller color mode.
- Controller
Flags - RGB Controller flags.
- Controller
Mode Kind - Kinds of modes that exist.
Directis usually the mode you want to use. - Device
Type - RGB controller device type.
- Direction
- Direction for
ModeData. - Mode
Flag - RGB controller mode flags.
- Open
RgbError - Errors that can occur while communicating with the
OpenRGBserver or creating commands. - Open
RgbLog Level - Log levels that
OpenRGBuses - Protocol
Option - Option that can be used to represent values not supported by the current protocol version.
VERis the minimum supported version.ProtocolOption<5, T>means that from sdk version 5 onwards, this will always beSome(T) - Server
Flags - Server flags
- Settings
Key - Keys for settings in
OpenRGB. - Zone
Flags - Flags for RGB controller zones
- Zone
Type - Type of zones available.
Traits§
- Controller
Index - Trait for things that can index into a
ControllerGroup.
Type Aliases§
- Color
- RGB controller color, aliased to rgb crate’s RGB8 type.
- HidDevice
List - I2cBus
List - Open
RgbResult - Type alias for
Result<T, OpenRgbError> - Serial
Port List - UsbDevice
List