web_sys/features/
gen_HidConnectionEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = HIDConnectionEvent , typescript_type = "HIDConnectionEvent")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `HidConnectionEvent` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDConnectionEvent)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `HidConnectionEvent`*"]
15    #[doc = ""]
16    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18    pub type HidConnectionEvent;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "HidDevice")]
21    # [wasm_bindgen (structural , method , getter , js_class = "HIDConnectionEvent" , js_name = device)]
22    #[doc = "Getter for the `device` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDConnectionEvent/device)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `HidConnectionEvent`, `HidDevice`*"]
27    #[doc = ""]
28    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
30    pub fn device(this: &HidConnectionEvent) -> HidDevice;
31    #[cfg(web_sys_unstable_apis)]
32    #[cfg(feature = "HidConnectionEventInit")]
33    #[wasm_bindgen(catch, constructor, js_class = "HIDConnectionEvent")]
34    #[doc = "The `new HidConnectionEvent(..)` constructor, creating a new instance of `HidConnectionEvent`."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDConnectionEvent/HIDConnectionEvent)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `HidConnectionEvent`, `HidConnectionEventInit`*"]
39    #[doc = ""]
40    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    pub fn new(
43        type_: &str,
44        event_init_dict: &HidConnectionEventInit,
45    ) -> Result<HidConnectionEvent, JsValue>;
46}