mirror of
https://github.com/OpenActionAPI/rust-elgato-streamdeck.git
synced 2026-10-28 09:44:56 +00:00
feat: convert Kind from str and to String (#52)
This commit is contained in:
1 parent
cb5c6ef037
commit
1483d5db5a
2 files changed
+6
No files matched your search
@@ -14,6 +14,7 @@ image = { version = "0.25", default-features = false, features = [
|
||||
"jpeg",
|
||||
] }
|
||||
tokio = { version = "1", optional = true }
|
||||
strum = { version = "0.27", features = ["derive"], optional = true }
|
||||
|
||||
[features]
|
||||
async = [
|
||||
@@ -22,6 +23,7 @@ async = [
|
||||
"tokio/rt-multi-thread",
|
||||
"tokio/time"
|
||||
]
|
||||
strum = ["dep:strum"]
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time"] }
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#[cfg(feature = "strum")]
|
||||
use strum::{Display, EnumIter, EnumString};
|
||||
|
||||
/// HIDAPI Vendor ID that Elgato products use
|
||||
pub const ELGATO_VENDOR_ID: u16 = 0x0fd9;
|
||||
|
||||
@@ -39,6 +42,7 @@ pub fn is_vendor_familiar(vendor: &u16) -> bool {
|
||||
|
||||
/// Enum describing kinds of Stream Decks out there
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "strum", derive(Display, EnumIter, EnumString))]
|
||||
pub enum Kind {
|
||||
/// First revision of original Stream Deck
|
||||
Original,
|
||||
|
||||
Reference in new issue
Block a user