1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = HIDReportItem)]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `HidReportItem` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
12     #[doc = ""]
13     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15     pub type HidReportItem;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl HidReportItem {
19     #[doc = "Construct a new `HidReportItem`."]
20     #[doc = ""]
21     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
22     #[doc = ""]
23     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
new() -> Self25     pub fn new() -> Self {
26         #[allow(unused_mut)]
27         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28         ret
29     }
30     #[cfg(web_sys_unstable_apis)]
31     #[doc = "Change the `hasNull` field of this object."]
32     #[doc = ""]
33     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
34     #[doc = ""]
35     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
36     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
has_null(&mut self, val: bool) -> &mut Self37     pub fn has_null(&mut self, val: bool) -> &mut Self {
38         use wasm_bindgen::JsValue;
39         let r = ::js_sys::Reflect::set(
40             self.as_ref(),
41             &JsValue::from("hasNull"),
42             &JsValue::from(val),
43         );
44         debug_assert!(
45             r.is_ok(),
46             "setting properties should never fail on our dictionary objects"
47         );
48         let _ = r;
49         self
50     }
51     #[cfg(web_sys_unstable_apis)]
52     #[doc = "Change the `hasPreferredState` field of this object."]
53     #[doc = ""]
54     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
55     #[doc = ""]
56     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
has_preferred_state(&mut self, val: bool) -> &mut Self58     pub fn has_preferred_state(&mut self, val: bool) -> &mut Self {
59         use wasm_bindgen::JsValue;
60         let r = ::js_sys::Reflect::set(
61             self.as_ref(),
62             &JsValue::from("hasPreferredState"),
63             &JsValue::from(val),
64         );
65         debug_assert!(
66             r.is_ok(),
67             "setting properties should never fail on our dictionary objects"
68         );
69         let _ = r;
70         self
71     }
72     #[cfg(web_sys_unstable_apis)]
73     #[doc = "Change the `isAbsolute` field of this object."]
74     #[doc = ""]
75     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
76     #[doc = ""]
77     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_absolute(&mut self, val: bool) -> &mut Self79     pub fn is_absolute(&mut self, val: bool) -> &mut Self {
80         use wasm_bindgen::JsValue;
81         let r = ::js_sys::Reflect::set(
82             self.as_ref(),
83             &JsValue::from("isAbsolute"),
84             &JsValue::from(val),
85         );
86         debug_assert!(
87             r.is_ok(),
88             "setting properties should never fail on our dictionary objects"
89         );
90         let _ = r;
91         self
92     }
93     #[cfg(web_sys_unstable_apis)]
94     #[doc = "Change the `isArray` field of this object."]
95     #[doc = ""]
96     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
97     #[doc = ""]
98     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_array(&mut self, val: bool) -> &mut Self100     pub fn is_array(&mut self, val: bool) -> &mut Self {
101         use wasm_bindgen::JsValue;
102         let r = ::js_sys::Reflect::set(
103             self.as_ref(),
104             &JsValue::from("isArray"),
105             &JsValue::from(val),
106         );
107         debug_assert!(
108             r.is_ok(),
109             "setting properties should never fail on our dictionary objects"
110         );
111         let _ = r;
112         self
113     }
114     #[cfg(web_sys_unstable_apis)]
115     #[doc = "Change the `isBufferedBytes` field of this object."]
116     #[doc = ""]
117     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
118     #[doc = ""]
119     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_buffered_bytes(&mut self, val: bool) -> &mut Self121     pub fn is_buffered_bytes(&mut self, val: bool) -> &mut Self {
122         use wasm_bindgen::JsValue;
123         let r = ::js_sys::Reflect::set(
124             self.as_ref(),
125             &JsValue::from("isBufferedBytes"),
126             &JsValue::from(val),
127         );
128         debug_assert!(
129             r.is_ok(),
130             "setting properties should never fail on our dictionary objects"
131         );
132         let _ = r;
133         self
134     }
135     #[cfg(web_sys_unstable_apis)]
136     #[doc = "Change the `isConstant` field of this object."]
137     #[doc = ""]
138     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
139     #[doc = ""]
140     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_constant(&mut self, val: bool) -> &mut Self142     pub fn is_constant(&mut self, val: bool) -> &mut Self {
143         use wasm_bindgen::JsValue;
144         let r = ::js_sys::Reflect::set(
145             self.as_ref(),
146             &JsValue::from("isConstant"),
147             &JsValue::from(val),
148         );
149         debug_assert!(
150             r.is_ok(),
151             "setting properties should never fail on our dictionary objects"
152         );
153         let _ = r;
154         self
155     }
156     #[cfg(web_sys_unstable_apis)]
157     #[doc = "Change the `isLinear` field of this object."]
158     #[doc = ""]
159     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
160     #[doc = ""]
161     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
162     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_linear(&mut self, val: bool) -> &mut Self163     pub fn is_linear(&mut self, val: bool) -> &mut Self {
164         use wasm_bindgen::JsValue;
165         let r = ::js_sys::Reflect::set(
166             self.as_ref(),
167             &JsValue::from("isLinear"),
168             &JsValue::from(val),
169         );
170         debug_assert!(
171             r.is_ok(),
172             "setting properties should never fail on our dictionary objects"
173         );
174         let _ = r;
175         self
176     }
177     #[cfg(web_sys_unstable_apis)]
178     #[doc = "Change the `isRange` field of this object."]
179     #[doc = ""]
180     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
181     #[doc = ""]
182     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
183     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_range(&mut self, val: bool) -> &mut Self184     pub fn is_range(&mut self, val: bool) -> &mut Self {
185         use wasm_bindgen::JsValue;
186         let r = ::js_sys::Reflect::set(
187             self.as_ref(),
188             &JsValue::from("isRange"),
189             &JsValue::from(val),
190         );
191         debug_assert!(
192             r.is_ok(),
193             "setting properties should never fail on our dictionary objects"
194         );
195         let _ = r;
196         self
197     }
198     #[cfg(web_sys_unstable_apis)]
199     #[doc = "Change the `isVolatile` field of this object."]
200     #[doc = ""]
201     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
202     #[doc = ""]
203     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
204     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
is_volatile(&mut self, val: bool) -> &mut Self205     pub fn is_volatile(&mut self, val: bool) -> &mut Self {
206         use wasm_bindgen::JsValue;
207         let r = ::js_sys::Reflect::set(
208             self.as_ref(),
209             &JsValue::from("isVolatile"),
210             &JsValue::from(val),
211         );
212         debug_assert!(
213             r.is_ok(),
214             "setting properties should never fail on our dictionary objects"
215         );
216         let _ = r;
217         self
218     }
219     #[cfg(web_sys_unstable_apis)]
220     #[doc = "Change the `logicalMaximum` field of this object."]
221     #[doc = ""]
222     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
223     #[doc = ""]
224     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
225     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
logical_maximum(&mut self, val: i32) -> &mut Self226     pub fn logical_maximum(&mut self, val: i32) -> &mut Self {
227         use wasm_bindgen::JsValue;
228         let r = ::js_sys::Reflect::set(
229             self.as_ref(),
230             &JsValue::from("logicalMaximum"),
231             &JsValue::from(val),
232         );
233         debug_assert!(
234             r.is_ok(),
235             "setting properties should never fail on our dictionary objects"
236         );
237         let _ = r;
238         self
239     }
240     #[cfg(web_sys_unstable_apis)]
241     #[doc = "Change the `logicalMinimum` field of this object."]
242     #[doc = ""]
243     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
244     #[doc = ""]
245     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
246     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
logical_minimum(&mut self, val: i32) -> &mut Self247     pub fn logical_minimum(&mut self, val: i32) -> &mut Self {
248         use wasm_bindgen::JsValue;
249         let r = ::js_sys::Reflect::set(
250             self.as_ref(),
251             &JsValue::from("logicalMinimum"),
252             &JsValue::from(val),
253         );
254         debug_assert!(
255             r.is_ok(),
256             "setting properties should never fail on our dictionary objects"
257         );
258         let _ = r;
259         self
260     }
261     #[cfg(web_sys_unstable_apis)]
262     #[doc = "Change the `physicalMaximum` field of this object."]
263     #[doc = ""]
264     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
265     #[doc = ""]
266     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
267     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
physical_maximum(&mut self, val: i32) -> &mut Self268     pub fn physical_maximum(&mut self, val: i32) -> &mut Self {
269         use wasm_bindgen::JsValue;
270         let r = ::js_sys::Reflect::set(
271             self.as_ref(),
272             &JsValue::from("physicalMaximum"),
273             &JsValue::from(val),
274         );
275         debug_assert!(
276             r.is_ok(),
277             "setting properties should never fail on our dictionary objects"
278         );
279         let _ = r;
280         self
281     }
282     #[cfg(web_sys_unstable_apis)]
283     #[doc = "Change the `physicalMinimum` field of this object."]
284     #[doc = ""]
285     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
286     #[doc = ""]
287     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
288     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
physical_minimum(&mut self, val: i32) -> &mut Self289     pub fn physical_minimum(&mut self, val: i32) -> &mut Self {
290         use wasm_bindgen::JsValue;
291         let r = ::js_sys::Reflect::set(
292             self.as_ref(),
293             &JsValue::from("physicalMinimum"),
294             &JsValue::from(val),
295         );
296         debug_assert!(
297             r.is_ok(),
298             "setting properties should never fail on our dictionary objects"
299         );
300         let _ = r;
301         self
302     }
303     #[cfg(web_sys_unstable_apis)]
304     #[doc = "Change the `reportCount` field of this object."]
305     #[doc = ""]
306     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
307     #[doc = ""]
308     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
309     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
report_count(&mut self, val: u16) -> &mut Self310     pub fn report_count(&mut self, val: u16) -> &mut Self {
311         use wasm_bindgen::JsValue;
312         let r = ::js_sys::Reflect::set(
313             self.as_ref(),
314             &JsValue::from("reportCount"),
315             &JsValue::from(val),
316         );
317         debug_assert!(
318             r.is_ok(),
319             "setting properties should never fail on our dictionary objects"
320         );
321         let _ = r;
322         self
323     }
324     #[cfg(web_sys_unstable_apis)]
325     #[doc = "Change the `reportSize` field of this object."]
326     #[doc = ""]
327     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
328     #[doc = ""]
329     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
330     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
report_size(&mut self, val: u16) -> &mut Self331     pub fn report_size(&mut self, val: u16) -> &mut Self {
332         use wasm_bindgen::JsValue;
333         let r = ::js_sys::Reflect::set(
334             self.as_ref(),
335             &JsValue::from("reportSize"),
336             &JsValue::from(val),
337         );
338         debug_assert!(
339             r.is_ok(),
340             "setting properties should never fail on our dictionary objects"
341         );
342         let _ = r;
343         self
344     }
345     #[cfg(web_sys_unstable_apis)]
346     #[doc = "Change the `strings` field of this object."]
347     #[doc = ""]
348     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
349     #[doc = ""]
350     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
351     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
strings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self352     pub fn strings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
353         use wasm_bindgen::JsValue;
354         let r = ::js_sys::Reflect::set(
355             self.as_ref(),
356             &JsValue::from("strings"),
357             &JsValue::from(val),
358         );
359         debug_assert!(
360             r.is_ok(),
361             "setting properties should never fail on our dictionary objects"
362         );
363         let _ = r;
364         self
365     }
366     #[cfg(web_sys_unstable_apis)]
367     #[doc = "Change the `unitExponent` field of this object."]
368     #[doc = ""]
369     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
370     #[doc = ""]
371     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
372     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_exponent(&mut self, val: i8) -> &mut Self373     pub fn unit_exponent(&mut self, val: i8) -> &mut Self {
374         use wasm_bindgen::JsValue;
375         let r = ::js_sys::Reflect::set(
376             self.as_ref(),
377             &JsValue::from("unitExponent"),
378             &JsValue::from(val),
379         );
380         debug_assert!(
381             r.is_ok(),
382             "setting properties should never fail on our dictionary objects"
383         );
384         let _ = r;
385         self
386     }
387     #[cfg(web_sys_unstable_apis)]
388     #[doc = "Change the `unitFactorCurrentExponent` field of this object."]
389     #[doc = ""]
390     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
391     #[doc = ""]
392     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
393     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_factor_current_exponent(&mut self, val: i8) -> &mut Self394     pub fn unit_factor_current_exponent(&mut self, val: i8) -> &mut Self {
395         use wasm_bindgen::JsValue;
396         let r = ::js_sys::Reflect::set(
397             self.as_ref(),
398             &JsValue::from("unitFactorCurrentExponent"),
399             &JsValue::from(val),
400         );
401         debug_assert!(
402             r.is_ok(),
403             "setting properties should never fail on our dictionary objects"
404         );
405         let _ = r;
406         self
407     }
408     #[cfg(web_sys_unstable_apis)]
409     #[doc = "Change the `unitFactorLengthExponent` field of this object."]
410     #[doc = ""]
411     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
412     #[doc = ""]
413     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
414     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_factor_length_exponent(&mut self, val: i8) -> &mut Self415     pub fn unit_factor_length_exponent(&mut self, val: i8) -> &mut Self {
416         use wasm_bindgen::JsValue;
417         let r = ::js_sys::Reflect::set(
418             self.as_ref(),
419             &JsValue::from("unitFactorLengthExponent"),
420             &JsValue::from(val),
421         );
422         debug_assert!(
423             r.is_ok(),
424             "setting properties should never fail on our dictionary objects"
425         );
426         let _ = r;
427         self
428     }
429     #[cfg(web_sys_unstable_apis)]
430     #[doc = "Change the `unitFactorLuminousIntensityExponent` field of this object."]
431     #[doc = ""]
432     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
433     #[doc = ""]
434     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
435     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_factor_luminous_intensity_exponent(&mut self, val: i8) -> &mut Self436     pub fn unit_factor_luminous_intensity_exponent(&mut self, val: i8) -> &mut Self {
437         use wasm_bindgen::JsValue;
438         let r = ::js_sys::Reflect::set(
439             self.as_ref(),
440             &JsValue::from("unitFactorLuminousIntensityExponent"),
441             &JsValue::from(val),
442         );
443         debug_assert!(
444             r.is_ok(),
445             "setting properties should never fail on our dictionary objects"
446         );
447         let _ = r;
448         self
449     }
450     #[cfg(web_sys_unstable_apis)]
451     #[doc = "Change the `unitFactorMassExponent` field of this object."]
452     #[doc = ""]
453     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
454     #[doc = ""]
455     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
456     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_factor_mass_exponent(&mut self, val: i8) -> &mut Self457     pub fn unit_factor_mass_exponent(&mut self, val: i8) -> &mut Self {
458         use wasm_bindgen::JsValue;
459         let r = ::js_sys::Reflect::set(
460             self.as_ref(),
461             &JsValue::from("unitFactorMassExponent"),
462             &JsValue::from(val),
463         );
464         debug_assert!(
465             r.is_ok(),
466             "setting properties should never fail on our dictionary objects"
467         );
468         let _ = r;
469         self
470     }
471     #[cfg(web_sys_unstable_apis)]
472     #[doc = "Change the `unitFactorTemperatureExponent` field of this object."]
473     #[doc = ""]
474     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
475     #[doc = ""]
476     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
477     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_factor_temperature_exponent(&mut self, val: i8) -> &mut Self478     pub fn unit_factor_temperature_exponent(&mut self, val: i8) -> &mut Self {
479         use wasm_bindgen::JsValue;
480         let r = ::js_sys::Reflect::set(
481             self.as_ref(),
482             &JsValue::from("unitFactorTemperatureExponent"),
483             &JsValue::from(val),
484         );
485         debug_assert!(
486             r.is_ok(),
487             "setting properties should never fail on our dictionary objects"
488         );
489         let _ = r;
490         self
491     }
492     #[cfg(web_sys_unstable_apis)]
493     #[doc = "Change the `unitFactorTimeExponent` field of this object."]
494     #[doc = ""]
495     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
496     #[doc = ""]
497     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
498     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_factor_time_exponent(&mut self, val: i8) -> &mut Self499     pub fn unit_factor_time_exponent(&mut self, val: i8) -> &mut Self {
500         use wasm_bindgen::JsValue;
501         let r = ::js_sys::Reflect::set(
502             self.as_ref(),
503             &JsValue::from("unitFactorTimeExponent"),
504             &JsValue::from(val),
505         );
506         debug_assert!(
507             r.is_ok(),
508             "setting properties should never fail on our dictionary objects"
509         );
510         let _ = r;
511         self
512     }
513     #[cfg(web_sys_unstable_apis)]
514     #[cfg(feature = "HidUnitSystem")]
515     #[doc = "Change the `unitSystem` field of this object."]
516     #[doc = ""]
517     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`, `HidUnitSystem`*"]
518     #[doc = ""]
519     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
520     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unit_system(&mut self, val: HidUnitSystem) -> &mut Self521     pub fn unit_system(&mut self, val: HidUnitSystem) -> &mut Self {
522         use wasm_bindgen::JsValue;
523         let r = ::js_sys::Reflect::set(
524             self.as_ref(),
525             &JsValue::from("unitSystem"),
526             &JsValue::from(val),
527         );
528         debug_assert!(
529             r.is_ok(),
530             "setting properties should never fail on our dictionary objects"
531         );
532         let _ = r;
533         self
534     }
535     #[cfg(web_sys_unstable_apis)]
536     #[doc = "Change the `usageMaximum` field of this object."]
537     #[doc = ""]
538     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
539     #[doc = ""]
540     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
541     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
usage_maximum(&mut self, val: u32) -> &mut Self542     pub fn usage_maximum(&mut self, val: u32) -> &mut Self {
543         use wasm_bindgen::JsValue;
544         let r = ::js_sys::Reflect::set(
545             self.as_ref(),
546             &JsValue::from("usageMaximum"),
547             &JsValue::from(val),
548         );
549         debug_assert!(
550             r.is_ok(),
551             "setting properties should never fail on our dictionary objects"
552         );
553         let _ = r;
554         self
555     }
556     #[cfg(web_sys_unstable_apis)]
557     #[doc = "Change the `usageMinimum` field of this object."]
558     #[doc = ""]
559     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
560     #[doc = ""]
561     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
562     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
usage_minimum(&mut self, val: u32) -> &mut Self563     pub fn usage_minimum(&mut self, val: u32) -> &mut Self {
564         use wasm_bindgen::JsValue;
565         let r = ::js_sys::Reflect::set(
566             self.as_ref(),
567             &JsValue::from("usageMinimum"),
568             &JsValue::from(val),
569         );
570         debug_assert!(
571             r.is_ok(),
572             "setting properties should never fail on our dictionary objects"
573         );
574         let _ = r;
575         self
576     }
577     #[cfg(web_sys_unstable_apis)]
578     #[doc = "Change the `usages` field of this object."]
579     #[doc = ""]
580     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
581     #[doc = ""]
582     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
583     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
usages(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self584     pub fn usages(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
585         use wasm_bindgen::JsValue;
586         let r =
587             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("usages"), &JsValue::from(val));
588         debug_assert!(
589             r.is_ok(),
590             "setting properties should never fail on our dictionary objects"
591         );
592         let _ = r;
593         self
594     }
595     #[cfg(web_sys_unstable_apis)]
596     #[doc = "Change the `wrap` field of this object."]
597     #[doc = ""]
598     #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"]
599     #[doc = ""]
600     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
601     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
wrap(&mut self, val: bool) -> &mut Self602     pub fn wrap(&mut self, val: bool) -> &mut Self {
603         use wasm_bindgen::JsValue;
604         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("wrap"), &JsValue::from(val));
605         debug_assert!(
606             r.is_ok(),
607             "setting properties should never fail on our dictionary objects"
608         );
609         let _ = r;
610         self
611     }
612 }
613 #[cfg(web_sys_unstable_apis)]
614 impl Default for HidReportItem {
default() -> Self615     fn default() -> Self {
616         Self::new()
617     }
618 }
619