Creates [Kind] variant from Vendor ID and Product ID
(vid: u16, pid: u16)
| 85 | impl Kind { |
| 86 | /// Creates [Kind] variant from Vendor ID and Product ID |
| 87 | pub fn from_vid_pid(vid: u16, pid: u16) -> Option<Kind> { |
| 88 | match vid { |
| 89 | ELGATO_VENDOR_ID => match pid { |
| 90 | PID_STREAMDECK_ORIGINAL => Some(Kind::Original), |
| 91 | PID_STREAMDECK_ORIGINAL_V2 => Some(Kind::OriginalV2), |
| 92 | PID_STREAMDECK_MINI => Some(Kind::Mini), |
| 93 | PID_STREAMDECK_XL => Some(Kind::Xl), |
| 94 | PID_STREAMDECK_XL_V2 => Some(Kind::XlV2), |
| 95 | PID_STREAMDECK_MK2 => Some(Kind::Mk2), |
| 96 | PID_STREAMDECK_MK2_SCISSOR_KEYS => Some(Kind::Mk2Scissor), |
| 97 | PID_STREAMDECK_MINI_MK2 => Some(Kind::MiniMk2), |
| 98 | PID_STREAMDECK_MINI_DISCORD => Some(Kind::MiniDiscord), |
| 99 | PID_STREAMDECK_NEO => Some(Kind::Neo), |
| 100 | PID_STREAMDECK_PEDAL => Some(Kind::Pedal), |
| 101 | PID_STREAMDECK_PLUS => Some(Kind::Plus), |
| 102 | PID_STREAMDECK_PLUS_XL => Some(Kind::PlusXl), |
| 103 | PID_STREAMDECK_MINI_MK2_MODULE => Some(Kind::MiniMk2Module), |
| 104 | PID_STREAMDECK_MK2_MODULE => Some(Kind::Mk2Module), |
| 105 | PID_STREAMDECK_XL_V2_MODULE => Some(Kind::XlV2Module), |
| 106 | _ => None, |
| 107 | }, |
| 108 | _ => None, |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | /// Retrieves Product ID of the Stream Deck |
| 113 | pub fn product_id(&self) -> u16 { |
nothing calls this directly
no outgoing calls
no test coverage detected