openrgb/lib.rs
1//! Client library for [OpenRGB](https://openrgb.org) SDK server.
2//!
3//! This client is async and requires a [tokio](https://tokio.rs) runtime to run.
4//!
5//! # Example
6//!
7//! ```no_run
8//! use openrgb::OpenRGB;
9//! use std::error::Error;
10//!
11//! #[tokio::main]
12//! async fn main() -> Result<(), Box<dyn Error>> {
13//!
14//! // connect to default server at localhost
15//! let client = OpenRGB::connect().await?;
16//!
17//! Ok(())
18//! }
19//! ```
20//!
21//! See [examples](https://github.com/nicoulaj/openrgb-rs/tree/master/examples), and [OpenRGB] for client API.
22
23#![warn(missing_docs)]
24#![deny(rustdoc::broken_intra_doc_links)]
25
26#[macro_use]
27extern crate enum_primitive_derive;
28extern crate num_traits;
29
30#[doc(inline)]
31pub use {
32 client::{DEFAULT_ADDR, DEFAULT_PROTOCOL, OpenRGB},
33 error::OpenRGBError,
34};
35
36mod client;
37mod error;
38mod protocol;
39pub mod data;
40
41#[cfg(test)]
42mod tests;