Skip to main content

web_sys/features/
gen_UsbDevice.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 = USBDevice , typescript_type = "USBDevice")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `UsbDevice` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
18    pub type UsbDevice;
19    #[cfg(web_sys_unstable_apis)]
20    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = usbVersionMajor)]
21    #[doc = "Getter for the `usbVersionMajor` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/usbVersionMajor)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
26    #[doc = ""]
27    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
29    pub fn usb_version_major(this: &UsbDevice) -> u8;
30    #[cfg(web_sys_unstable_apis)]
31    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = usbVersionMinor)]
32    #[doc = "Getter for the `usbVersionMinor` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/usbVersionMinor)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
37    #[doc = ""]
38    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
40    pub fn usb_version_minor(this: &UsbDevice) -> u8;
41    #[cfg(web_sys_unstable_apis)]
42    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = usbVersionSubminor)]
43    #[doc = "Getter for the `usbVersionSubminor` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/usbVersionSubminor)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    pub fn usb_version_subminor(this: &UsbDevice) -> u8;
52    #[cfg(web_sys_unstable_apis)]
53    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = deviceClass)]
54    #[doc = "Getter for the `deviceClass` field of this object."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/deviceClass)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
59    #[doc = ""]
60    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62    pub fn device_class(this: &UsbDevice) -> u8;
63    #[cfg(web_sys_unstable_apis)]
64    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = deviceSubclass)]
65    #[doc = "Getter for the `deviceSubclass` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/deviceSubclass)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
70    #[doc = ""]
71    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
73    pub fn device_subclass(this: &UsbDevice) -> u8;
74    #[cfg(web_sys_unstable_apis)]
75    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = deviceProtocol)]
76    #[doc = "Getter for the `deviceProtocol` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/deviceProtocol)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
81    #[doc = ""]
82    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
84    pub fn device_protocol(this: &UsbDevice) -> u8;
85    #[cfg(web_sys_unstable_apis)]
86    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = vendorId)]
87    #[doc = "Getter for the `vendorId` field of this object."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/vendorId)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
92    #[doc = ""]
93    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95    pub fn vendor_id(this: &UsbDevice) -> u16;
96    #[cfg(web_sys_unstable_apis)]
97    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = productId)]
98    #[doc = "Getter for the `productId` field of this object."]
99    #[doc = ""]
100    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/productId)"]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
103    #[doc = ""]
104    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
106    pub fn product_id(this: &UsbDevice) -> u16;
107    #[cfg(web_sys_unstable_apis)]
108    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = deviceVersionMajor)]
109    #[doc = "Getter for the `deviceVersionMajor` field of this object."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/deviceVersionMajor)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
114    #[doc = ""]
115    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
116    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
117    pub fn device_version_major(this: &UsbDevice) -> u8;
118    #[cfg(web_sys_unstable_apis)]
119    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = deviceVersionMinor)]
120    #[doc = "Getter for the `deviceVersionMinor` field of this object."]
121    #[doc = ""]
122    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/deviceVersionMinor)"]
123    #[doc = ""]
124    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
125    #[doc = ""]
126    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
127    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
128    pub fn device_version_minor(this: &UsbDevice) -> u8;
129    #[cfg(web_sys_unstable_apis)]
130    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = deviceVersionSubminor)]
131    #[doc = "Getter for the `deviceVersionSubminor` field of this object."]
132    #[doc = ""]
133    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/deviceVersionSubminor)"]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
136    #[doc = ""]
137    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
138    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
139    pub fn device_version_subminor(this: &UsbDevice) -> u8;
140    #[cfg(web_sys_unstable_apis)]
141    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = manufacturerName)]
142    #[doc = "Getter for the `manufacturerName` field of this object."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/manufacturerName)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
147    #[doc = ""]
148    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
149    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
150    pub fn manufacturer_name(this: &UsbDevice) -> Option<::alloc::string::String>;
151    #[cfg(web_sys_unstable_apis)]
152    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = productName)]
153    #[doc = "Getter for the `productName` field of this object."]
154    #[doc = ""]
155    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/productName)"]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
158    #[doc = ""]
159    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
160    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
161    pub fn product_name(this: &UsbDevice) -> Option<::alloc::string::String>;
162    #[cfg(web_sys_unstable_apis)]
163    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = serialNumber)]
164    #[doc = "Getter for the `serialNumber` field of this object."]
165    #[doc = ""]
166    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/serialNumber)"]
167    #[doc = ""]
168    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
169    #[doc = ""]
170    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
171    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
172    pub fn serial_number(this: &UsbDevice) -> Option<::alloc::string::String>;
173    #[cfg(web_sys_unstable_apis)]
174    #[cfg(feature = "UsbConfiguration")]
175    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = configuration)]
176    #[doc = "Getter for the `configuration` field of this object."]
177    #[doc = ""]
178    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/configuration)"]
179    #[doc = ""]
180    #[doc = "*This API requires the following crate features to be activated: `UsbConfiguration`, `UsbDevice`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
184    pub fn configuration(this: &UsbDevice) -> Option<UsbConfiguration>;
185    #[cfg(web_sys_unstable_apis)]
186    #[cfg(feature = "UsbConfiguration")]
187    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = configurations)]
188    #[doc = "Getter for the `configurations` field of this object."]
189    #[doc = ""]
190    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/configurations)"]
191    #[doc = ""]
192    #[doc = "*This API requires the following crate features to be activated: `UsbConfiguration`, `UsbDevice`*"]
193    #[doc = ""]
194    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
195    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
196    pub fn configurations(this: &UsbDevice) -> ::js_sys::Array<UsbConfiguration>;
197    #[cfg(web_sys_unstable_apis)]
198    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = opened)]
199    #[doc = "Getter for the `opened` field of this object."]
200    #[doc = ""]
201    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/opened)"]
202    #[doc = ""]
203    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
204    #[doc = ""]
205    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
206    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
207    pub fn opened(this: &UsbDevice) -> bool;
208    #[cfg(web_sys_unstable_apis)]
209    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = claimInterface)]
210    #[doc = "The `claimInterface()` method."]
211    #[doc = ""]
212    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/claimInterface)"]
213    #[doc = ""]
214    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
215    #[doc = ""]
216    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
217    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
218    pub fn claim_interface(
219        this: &UsbDevice,
220        interface_number: u8,
221    ) -> ::js_sys::Promise<::js_sys::Undefined>;
222    #[cfg(web_sys_unstable_apis)]
223    #[cfg(feature = "UsbDirection")]
224    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = clearHalt)]
225    #[doc = "The `clearHalt()` method."]
226    #[doc = ""]
227    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/clearHalt)"]
228    #[doc = ""]
229    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbDirection`*"]
230    #[doc = ""]
231    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
232    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
233    pub fn clear_halt(
234        this: &UsbDevice,
235        direction: UsbDirection,
236        endpoint_number: u8,
237    ) -> ::js_sys::Promise<::js_sys::Undefined>;
238    #[cfg(web_sys_unstable_apis)]
239    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = close)]
240    #[doc = "The `close()` method."]
241    #[doc = ""]
242    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/close)"]
243    #[doc = ""]
244    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
245    #[doc = ""]
246    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
247    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
248    pub fn close(this: &UsbDevice) -> ::js_sys::Promise<::js_sys::Undefined>;
249    #[cfg(web_sys_unstable_apis)]
250    #[cfg(all(
251        feature = "UsbControlTransferParameters",
252        feature = "UsbInTransferResult",
253    ))]
254    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = controlTransferIn)]
255    #[doc = "The `controlTransferIn()` method."]
256    #[doc = ""]
257    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferIn)"]
258    #[doc = ""]
259    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`, `UsbInTransferResult`*"]
260    #[doc = ""]
261    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
262    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
263    pub fn control_transfer_in(
264        this: &UsbDevice,
265        setup: &UsbControlTransferParameters,
266        length: u16,
267    ) -> ::js_sys::Promise<UsbInTransferResult>;
268    #[cfg(web_sys_unstable_apis)]
269    #[cfg(all(
270        feature = "UsbControlTransferParameters",
271        feature = "UsbOutTransferResult",
272    ))]
273    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
274    #[doc = "The `controlTransferOut()` method."]
275    #[doc = ""]
276    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
277    #[doc = ""]
278    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`, `UsbOutTransferResult`*"]
279    #[doc = ""]
280    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
281    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
282    pub fn control_transfer_out(
283        this: &UsbDevice,
284        setup: &UsbControlTransferParameters,
285    ) -> ::js_sys::Promise<UsbOutTransferResult>;
286    #[cfg(web_sys_unstable_apis)]
287    #[cfg(all(
288        feature = "UsbControlTransferParameters",
289        feature = "UsbOutTransferResult",
290    ))]
291    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
292    #[doc = "The `controlTransferOut()` method."]
293    #[doc = ""]
294    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
295    #[doc = ""]
296    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`, `UsbOutTransferResult`*"]
297    #[doc = ""]
298    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
299    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
300    pub fn control_transfer_out_with_buffer_source(
301        this: &UsbDevice,
302        setup: &UsbControlTransferParameters,
303        data: &::js_sys::Object,
304    ) -> Result<::js_sys::Promise<UsbOutTransferResult>, JsValue>;
305    #[cfg(web_sys_unstable_apis)]
306    #[cfg(all(
307        feature = "UsbControlTransferParameters",
308        feature = "UsbOutTransferResult",
309    ))]
310    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
311    #[doc = "The `controlTransferOut()` method."]
312    #[doc = ""]
313    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
314    #[doc = ""]
315    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`, `UsbOutTransferResult`*"]
316    #[doc = ""]
317    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
318    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
319    pub fn control_transfer_out_with_u8_slice(
320        this: &UsbDevice,
321        setup: &UsbControlTransferParameters,
322        data: &mut [u8],
323    ) -> Result<::js_sys::Promise<UsbOutTransferResult>, JsValue>;
324    #[cfg(web_sys_unstable_apis)]
325    #[cfg(all(
326        feature = "UsbControlTransferParameters",
327        feature = "UsbOutTransferResult",
328    ))]
329    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
330    #[doc = "The `controlTransferOut()` method."]
331    #[doc = ""]
332    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
333    #[doc = ""]
334    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`, `UsbOutTransferResult`*"]
335    #[doc = ""]
336    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
337    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
338    pub fn control_transfer_out_with_u8_array(
339        this: &UsbDevice,
340        setup: &UsbControlTransferParameters,
341        data: &::js_sys::Uint8Array,
342    ) -> Result<::js_sys::Promise<UsbOutTransferResult>, JsValue>;
343    #[cfg(web_sys_unstable_apis)]
344    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = forget)]
345    #[doc = "The `forget()` method."]
346    #[doc = ""]
347    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/forget)"]
348    #[doc = ""]
349    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
350    #[doc = ""]
351    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
352    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
353    pub fn forget(this: &UsbDevice) -> ::js_sys::Promise<::js_sys::Undefined>;
354    #[cfg(web_sys_unstable_apis)]
355    #[cfg(feature = "UsbIsochronousInTransferResult")]
356    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = isochronousTransferIn)]
357    #[doc = "The `isochronousTransferIn()` method."]
358    #[doc = ""]
359    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferIn)"]
360    #[doc = ""]
361    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbIsochronousInTransferResult`*"]
362    #[doc = ""]
363    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
364    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
365    pub fn isochronous_transfer_in(
366        this: &UsbDevice,
367        endpoint_number: u8,
368        packet_lengths: &[::js_sys::Number],
369    ) -> ::js_sys::Promise<UsbIsochronousInTransferResult>;
370    #[cfg(web_sys_unstable_apis)]
371    #[cfg(feature = "UsbIsochronousOutTransferResult")]
372    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = isochronousTransferOut)]
373    #[doc = "The `isochronousTransferOut()` method."]
374    #[doc = ""]
375    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferOut)"]
376    #[doc = ""]
377    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbIsochronousOutTransferResult`*"]
378    #[doc = ""]
379    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
380    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
381    pub fn isochronous_transfer_out_with_buffer_source(
382        this: &UsbDevice,
383        endpoint_number: u8,
384        data: &::js_sys::Object,
385        packet_lengths: &[::js_sys::Number],
386    ) -> Result<::js_sys::Promise<UsbIsochronousOutTransferResult>, JsValue>;
387    #[cfg(web_sys_unstable_apis)]
388    #[cfg(feature = "UsbIsochronousOutTransferResult")]
389    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = isochronousTransferOut)]
390    #[doc = "The `isochronousTransferOut()` method."]
391    #[doc = ""]
392    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferOut)"]
393    #[doc = ""]
394    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbIsochronousOutTransferResult`*"]
395    #[doc = ""]
396    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
397    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
398    pub fn isochronous_transfer_out_with_u8_slice(
399        this: &UsbDevice,
400        endpoint_number: u8,
401        data: &mut [u8],
402        packet_lengths: &[::js_sys::Number],
403    ) -> Result<::js_sys::Promise<UsbIsochronousOutTransferResult>, JsValue>;
404    #[cfg(web_sys_unstable_apis)]
405    #[cfg(feature = "UsbIsochronousOutTransferResult")]
406    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = isochronousTransferOut)]
407    #[doc = "The `isochronousTransferOut()` method."]
408    #[doc = ""]
409    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferOut)"]
410    #[doc = ""]
411    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbIsochronousOutTransferResult`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
415    pub fn isochronous_transfer_out_with_u8_array(
416        this: &UsbDevice,
417        endpoint_number: u8,
418        data: &::js_sys::Uint8Array,
419        packet_lengths: &[::js_sys::Number],
420    ) -> Result<::js_sys::Promise<UsbIsochronousOutTransferResult>, JsValue>;
421    #[cfg(web_sys_unstable_apis)]
422    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = open)]
423    #[doc = "The `open()` method."]
424    #[doc = ""]
425    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/open)"]
426    #[doc = ""]
427    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
428    #[doc = ""]
429    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
430    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
431    pub fn open(this: &UsbDevice) -> ::js_sys::Promise<::js_sys::Undefined>;
432    #[cfg(web_sys_unstable_apis)]
433    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = releaseInterface)]
434    #[doc = "The `releaseInterface()` method."]
435    #[doc = ""]
436    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/releaseInterface)"]
437    #[doc = ""]
438    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
439    #[doc = ""]
440    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
441    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
442    pub fn release_interface(
443        this: &UsbDevice,
444        interface_number: u8,
445    ) -> ::js_sys::Promise<::js_sys::Undefined>;
446    #[cfg(web_sys_unstable_apis)]
447    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = reset)]
448    #[doc = "The `reset()` method."]
449    #[doc = ""]
450    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/reset)"]
451    #[doc = ""]
452    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
453    #[doc = ""]
454    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
455    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
456    pub fn reset(this: &UsbDevice) -> ::js_sys::Promise<::js_sys::Undefined>;
457    #[cfg(web_sys_unstable_apis)]
458    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = selectAlternateInterface)]
459    #[doc = "The `selectAlternateInterface()` method."]
460    #[doc = ""]
461    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/selectAlternateInterface)"]
462    #[doc = ""]
463    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
464    #[doc = ""]
465    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
466    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
467    pub fn select_alternate_interface(
468        this: &UsbDevice,
469        interface_number: u8,
470        alternate_setting: u8,
471    ) -> ::js_sys::Promise<::js_sys::Undefined>;
472    #[cfg(web_sys_unstable_apis)]
473    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = selectConfiguration)]
474    #[doc = "The `selectConfiguration()` method."]
475    #[doc = ""]
476    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/selectConfiguration)"]
477    #[doc = ""]
478    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
479    #[doc = ""]
480    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
481    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
482    pub fn select_configuration(
483        this: &UsbDevice,
484        configuration_value: u8,
485    ) -> ::js_sys::Promise<::js_sys::Undefined>;
486    #[cfg(web_sys_unstable_apis)]
487    #[cfg(feature = "UsbInTransferResult")]
488    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = transferIn)]
489    #[doc = "The `transferIn()` method."]
490    #[doc = ""]
491    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferIn)"]
492    #[doc = ""]
493    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbInTransferResult`*"]
494    #[doc = ""]
495    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
496    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
497    pub fn transfer_in(
498        this: &UsbDevice,
499        endpoint_number: u8,
500        length: u32,
501    ) -> ::js_sys::Promise<UsbInTransferResult>;
502    #[cfg(web_sys_unstable_apis)]
503    #[cfg(feature = "UsbOutTransferResult")]
504    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = transferOut)]
505    #[doc = "The `transferOut()` method."]
506    #[doc = ""]
507    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferOut)"]
508    #[doc = ""]
509    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbOutTransferResult`*"]
510    #[doc = ""]
511    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
512    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
513    pub fn transfer_out_with_buffer_source(
514        this: &UsbDevice,
515        endpoint_number: u8,
516        data: &::js_sys::Object,
517    ) -> Result<::js_sys::Promise<UsbOutTransferResult>, JsValue>;
518    #[cfg(web_sys_unstable_apis)]
519    #[cfg(feature = "UsbOutTransferResult")]
520    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = transferOut)]
521    #[doc = "The `transferOut()` method."]
522    #[doc = ""]
523    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferOut)"]
524    #[doc = ""]
525    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbOutTransferResult`*"]
526    #[doc = ""]
527    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
528    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
529    pub fn transfer_out_with_u8_slice(
530        this: &UsbDevice,
531        endpoint_number: u8,
532        data: &mut [u8],
533    ) -> Result<::js_sys::Promise<UsbOutTransferResult>, JsValue>;
534    #[cfg(web_sys_unstable_apis)]
535    #[cfg(feature = "UsbOutTransferResult")]
536    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = transferOut)]
537    #[doc = "The `transferOut()` method."]
538    #[doc = ""]
539    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferOut)"]
540    #[doc = ""]
541    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbOutTransferResult`*"]
542    #[doc = ""]
543    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
544    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
545    pub fn transfer_out_with_u8_array(
546        this: &UsbDevice,
547        endpoint_number: u8,
548        data: &::js_sys::Uint8Array,
549    ) -> Result<::js_sys::Promise<UsbOutTransferResult>, JsValue>;
550}