web_sys/features/
gen_HidCollectionInfo.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 = :: js_sys :: Object , js_name = HIDCollectionInfo)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `HidCollectionInfo` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type HidCollectionInfo;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `children` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "children")]
25    pub fn get_children(this: &HidCollectionInfo) -> Option<::js_sys::Array>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `children` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "children")]
34    pub fn set_children(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue);
35    #[cfg(web_sys_unstable_apis)]
36    #[doc = "Get the `featureReports` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
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    #[wasm_bindgen(method, getter = "featureReports")]
43    pub fn get_feature_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>;
44    #[cfg(web_sys_unstable_apis)]
45    #[doc = "Change the `featureReports` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
48    #[doc = ""]
49    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    #[wasm_bindgen(method, setter = "featureReports")]
52    pub fn set_feature_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue);
53    #[cfg(web_sys_unstable_apis)]
54    #[doc = "Get the `inputReports` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
57    #[doc = ""]
58    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
60    #[wasm_bindgen(method, getter = "inputReports")]
61    pub fn get_input_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>;
62    #[cfg(web_sys_unstable_apis)]
63    #[doc = "Change the `inputReports` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
66    #[doc = ""]
67    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
69    #[wasm_bindgen(method, setter = "inputReports")]
70    pub fn set_input_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue);
71    #[cfg(web_sys_unstable_apis)]
72    #[doc = "Get the `outputReports` field of this object."]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
75    #[doc = ""]
76    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
78    #[wasm_bindgen(method, getter = "outputReports")]
79    pub fn get_output_reports(this: &HidCollectionInfo) -> Option<::js_sys::Array>;
80    #[cfg(web_sys_unstable_apis)]
81    #[doc = "Change the `outputReports` field of this object."]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
84    #[doc = ""]
85    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
87    #[wasm_bindgen(method, setter = "outputReports")]
88    pub fn set_output_reports(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue);
89    #[cfg(web_sys_unstable_apis)]
90    #[doc = "Get the `type` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
93    #[doc = ""]
94    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
96    #[wasm_bindgen(method, getter = "type")]
97    pub fn get_type(this: &HidCollectionInfo) -> Option<u8>;
98    #[cfg(web_sys_unstable_apis)]
99    #[doc = "Change the `type` field of this object."]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
102    #[doc = ""]
103    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
104    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
105    #[wasm_bindgen(method, setter = "type")]
106    pub fn set_type(this: &HidCollectionInfo, val: u8);
107    #[cfg(web_sys_unstable_apis)]
108    #[doc = "Get the `usage` field of this object."]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
111    #[doc = ""]
112    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
114    #[wasm_bindgen(method, getter = "usage")]
115    pub fn get_usage(this: &HidCollectionInfo) -> Option<u16>;
116    #[cfg(web_sys_unstable_apis)]
117    #[doc = "Change the `usage` field of this object."]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
120    #[doc = ""]
121    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
122    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
123    #[wasm_bindgen(method, setter = "usage")]
124    pub fn set_usage(this: &HidCollectionInfo, val: u16);
125    #[cfg(web_sys_unstable_apis)]
126    #[doc = "Get the `usagePage` field of this object."]
127    #[doc = ""]
128    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
129    #[doc = ""]
130    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
131    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
132    #[wasm_bindgen(method, getter = "usagePage")]
133    pub fn get_usage_page(this: &HidCollectionInfo) -> Option<u16>;
134    #[cfg(web_sys_unstable_apis)]
135    #[doc = "Change the `usagePage` field of this object."]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
138    #[doc = ""]
139    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
140    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
141    #[wasm_bindgen(method, setter = "usagePage")]
142    pub fn set_usage_page(this: &HidCollectionInfo, val: u16);
143}
144#[cfg(web_sys_unstable_apis)]
145impl HidCollectionInfo {
146    #[doc = "Construct a new `HidCollectionInfo`."]
147    #[doc = ""]
148    #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"]
149    #[doc = ""]
150    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
152    pub fn new() -> Self {
153        #[allow(unused_mut)]
154        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
155        ret
156    }
157    #[cfg(web_sys_unstable_apis)]
158    #[deprecated = "Use `set_children()` instead."]
159    pub fn children(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
160        self.set_children(val);
161        self
162    }
163    #[cfg(web_sys_unstable_apis)]
164    #[deprecated = "Use `set_feature_reports()` instead."]
165    pub fn feature_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
166        self.set_feature_reports(val);
167        self
168    }
169    #[cfg(web_sys_unstable_apis)]
170    #[deprecated = "Use `set_input_reports()` instead."]
171    pub fn input_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
172        self.set_input_reports(val);
173        self
174    }
175    #[cfg(web_sys_unstable_apis)]
176    #[deprecated = "Use `set_output_reports()` instead."]
177    pub fn output_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
178        self.set_output_reports(val);
179        self
180    }
181    #[cfg(web_sys_unstable_apis)]
182    #[deprecated = "Use `set_type()` instead."]
183    pub fn type_(&mut self, val: u8) -> &mut Self {
184        self.set_type(val);
185        self
186    }
187    #[cfg(web_sys_unstable_apis)]
188    #[deprecated = "Use `set_usage()` instead."]
189    pub fn usage(&mut self, val: u16) -> &mut Self {
190        self.set_usage(val);
191        self
192    }
193    #[cfg(web_sys_unstable_apis)]
194    #[deprecated = "Use `set_usage_page()` instead."]
195    pub fn usage_page(&mut self, val: u16) -> &mut Self {
196        self.set_usage_page(val);
197        self
198    }
199}
200#[cfg(web_sys_unstable_apis)]
201impl Default for HidCollectionInfo {
202    fn default() -> Self {
203        Self::new()
204    }
205}