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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
184    pub fn configuration(this: &UsbDevice) -> Option<UsbConfiguration>;
185    #[cfg(web_sys_unstable_apis)]
186    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = configurations)]
187    #[doc = "Getter for the `configurations` field of this object."]
188    #[doc = ""]
189    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/configurations)"]
190    #[doc = ""]
191    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
192    #[doc = ""]
193    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
194    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
195    pub fn configurations(this: &UsbDevice) -> ::js_sys::Array;
196    #[cfg(web_sys_unstable_apis)]
197    # [wasm_bindgen (structural , method , getter , js_class = "USBDevice" , js_name = opened)]
198    #[doc = "Getter for the `opened` field of this object."]
199    #[doc = ""]
200    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/opened)"]
201    #[doc = ""]
202    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
203    #[doc = ""]
204    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
205    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
206    pub fn opened(this: &UsbDevice) -> bool;
207    #[cfg(web_sys_unstable_apis)]
208    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = claimInterface)]
209    #[doc = "The `claimInterface()` method."]
210    #[doc = ""]
211    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/claimInterface)"]
212    #[doc = ""]
213    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
214    #[doc = ""]
215    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
216    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
217    pub fn claim_interface(this: &UsbDevice, interface_number: u8) -> ::js_sys::Promise;
218    #[cfg(web_sys_unstable_apis)]
219    #[cfg(feature = "UsbDirection")]
220    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = clearHalt)]
221    #[doc = "The `clearHalt()` method."]
222    #[doc = ""]
223    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/clearHalt)"]
224    #[doc = ""]
225    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`, `UsbDirection`*"]
226    #[doc = ""]
227    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
228    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
229    pub fn clear_halt(
230        this: &UsbDevice,
231        direction: UsbDirection,
232        endpoint_number: u8,
233    ) -> ::js_sys::Promise;
234    #[cfg(web_sys_unstable_apis)]
235    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = close)]
236    #[doc = "The `close()` method."]
237    #[doc = ""]
238    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/close)"]
239    #[doc = ""]
240    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
241    #[doc = ""]
242    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
243    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
244    pub fn close(this: &UsbDevice) -> ::js_sys::Promise;
245    #[cfg(web_sys_unstable_apis)]
246    #[cfg(feature = "UsbControlTransferParameters")]
247    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = controlTransferIn)]
248    #[doc = "The `controlTransferIn()` method."]
249    #[doc = ""]
250    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferIn)"]
251    #[doc = ""]
252    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`*"]
253    #[doc = ""]
254    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
255    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
256    pub fn control_transfer_in(
257        this: &UsbDevice,
258        setup: &UsbControlTransferParameters,
259        length: u16,
260    ) -> ::js_sys::Promise;
261    #[cfg(web_sys_unstable_apis)]
262    #[cfg(feature = "UsbControlTransferParameters")]
263    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
264    #[doc = "The `controlTransferOut()` method."]
265    #[doc = ""]
266    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
267    #[doc = ""]
268    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`*"]
269    #[doc = ""]
270    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
271    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
272    pub fn control_transfer_out(
273        this: &UsbDevice,
274        setup: &UsbControlTransferParameters,
275    ) -> ::js_sys::Promise;
276    #[cfg(web_sys_unstable_apis)]
277    #[cfg(feature = "UsbControlTransferParameters")]
278    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
279    #[doc = "The `controlTransferOut()` method."]
280    #[doc = ""]
281    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
282    #[doc = ""]
283    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`*"]
284    #[doc = ""]
285    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
286    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
287    pub fn control_transfer_out_with_buffer_source(
288        this: &UsbDevice,
289        setup: &UsbControlTransferParameters,
290        data: &::js_sys::Object,
291    ) -> Result<::js_sys::Promise, JsValue>;
292    #[cfg(web_sys_unstable_apis)]
293    #[cfg(feature = "UsbControlTransferParameters")]
294    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = controlTransferOut)]
295    #[doc = "The `controlTransferOut()` method."]
296    #[doc = ""]
297    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/controlTransferOut)"]
298    #[doc = ""]
299    #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbDevice`*"]
300    #[doc = ""]
301    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
302    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
303    pub fn control_transfer_out_with_u8_slice(
304        this: &UsbDevice,
305        setup: &UsbControlTransferParameters,
306        data: &mut [u8],
307    ) -> Result<::js_sys::Promise, JsValue>;
308    #[cfg(web_sys_unstable_apis)]
309    #[cfg(feature = "UsbControlTransferParameters")]
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`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
319    pub fn control_transfer_out_with_u8_array(
320        this: &UsbDevice,
321        setup: &UsbControlTransferParameters,
322        data: &::js_sys::Uint8Array,
323    ) -> Result<::js_sys::Promise, JsValue>;
324    #[cfg(web_sys_unstable_apis)]
325    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = forget)]
326    #[doc = "The `forget()` method."]
327    #[doc = ""]
328    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/forget)"]
329    #[doc = ""]
330    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
331    #[doc = ""]
332    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
333    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
334    pub fn forget(this: &UsbDevice) -> ::js_sys::Promise;
335    #[cfg(web_sys_unstable_apis)]
336    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = isochronousTransferIn)]
337    #[doc = "The `isochronousTransferIn()` method."]
338    #[doc = ""]
339    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferIn)"]
340    #[doc = ""]
341    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
342    #[doc = ""]
343    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
344    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
345    pub fn isochronous_transfer_in(
346        this: &UsbDevice,
347        endpoint_number: u8,
348        packet_lengths: &::wasm_bindgen::JsValue,
349    ) -> ::js_sys::Promise;
350    #[cfg(web_sys_unstable_apis)]
351    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = isochronousTransferOut)]
352    #[doc = "The `isochronousTransferOut()` method."]
353    #[doc = ""]
354    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferOut)"]
355    #[doc = ""]
356    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
357    #[doc = ""]
358    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
359    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
360    pub fn isochronous_transfer_out_with_buffer_source(
361        this: &UsbDevice,
362        endpoint_number: u8,
363        data: &::js_sys::Object,
364        packet_lengths: &::wasm_bindgen::JsValue,
365    ) -> Result<::js_sys::Promise, JsValue>;
366    #[cfg(web_sys_unstable_apis)]
367    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = isochronousTransferOut)]
368    #[doc = "The `isochronousTransferOut()` method."]
369    #[doc = ""]
370    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferOut)"]
371    #[doc = ""]
372    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
373    #[doc = ""]
374    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
375    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
376    pub fn isochronous_transfer_out_with_u8_slice(
377        this: &UsbDevice,
378        endpoint_number: u8,
379        data: &mut [u8],
380        packet_lengths: &::wasm_bindgen::JsValue,
381    ) -> Result<::js_sys::Promise, JsValue>;
382    #[cfg(web_sys_unstable_apis)]
383    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = isochronousTransferOut)]
384    #[doc = "The `isochronousTransferOut()` method."]
385    #[doc = ""]
386    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/isochronousTransferOut)"]
387    #[doc = ""]
388    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
389    #[doc = ""]
390    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
391    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
392    pub fn isochronous_transfer_out_with_u8_array(
393        this: &UsbDevice,
394        endpoint_number: u8,
395        data: &::js_sys::Uint8Array,
396        packet_lengths: &::wasm_bindgen::JsValue,
397    ) -> Result<::js_sys::Promise, JsValue>;
398    #[cfg(web_sys_unstable_apis)]
399    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = open)]
400    #[doc = "The `open()` method."]
401    #[doc = ""]
402    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/open)"]
403    #[doc = ""]
404    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
405    #[doc = ""]
406    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
407    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
408    pub fn open(this: &UsbDevice) -> ::js_sys::Promise;
409    #[cfg(web_sys_unstable_apis)]
410    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = releaseInterface)]
411    #[doc = "The `releaseInterface()` method."]
412    #[doc = ""]
413    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/releaseInterface)"]
414    #[doc = ""]
415    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
416    #[doc = ""]
417    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
418    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
419    pub fn release_interface(this: &UsbDevice, interface_number: u8) -> ::js_sys::Promise;
420    #[cfg(web_sys_unstable_apis)]
421    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = reset)]
422    #[doc = "The `reset()` method."]
423    #[doc = ""]
424    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/reset)"]
425    #[doc = ""]
426    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
427    #[doc = ""]
428    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
429    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
430    pub fn reset(this: &UsbDevice) -> ::js_sys::Promise;
431    #[cfg(web_sys_unstable_apis)]
432    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = selectAlternateInterface)]
433    #[doc = "The `selectAlternateInterface()` method."]
434    #[doc = ""]
435    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/selectAlternateInterface)"]
436    #[doc = ""]
437    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
438    #[doc = ""]
439    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
440    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
441    pub fn select_alternate_interface(
442        this: &UsbDevice,
443        interface_number: u8,
444        alternate_setting: u8,
445    ) -> ::js_sys::Promise;
446    #[cfg(web_sys_unstable_apis)]
447    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = selectConfiguration)]
448    #[doc = "The `selectConfiguration()` method."]
449    #[doc = ""]
450    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/selectConfiguration)"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
456    pub fn select_configuration(this: &UsbDevice, configuration_value: u8) -> ::js_sys::Promise;
457    #[cfg(web_sys_unstable_apis)]
458    # [wasm_bindgen (method , structural , js_class = "USBDevice" , js_name = transferIn)]
459    #[doc = "The `transferIn()` method."]
460    #[doc = ""]
461    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferIn)"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
467    pub fn transfer_in(this: &UsbDevice, endpoint_number: u8, length: u32) -> ::js_sys::Promise;
468    #[cfg(web_sys_unstable_apis)]
469    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = transferOut)]
470    #[doc = "The `transferOut()` method."]
471    #[doc = ""]
472    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferOut)"]
473    #[doc = ""]
474    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
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)*"]
478    pub fn transfer_out_with_buffer_source(
479        this: &UsbDevice,
480        endpoint_number: u8,
481        data: &::js_sys::Object,
482    ) -> Result<::js_sys::Promise, JsValue>;
483    #[cfg(web_sys_unstable_apis)]
484    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = transferOut)]
485    #[doc = "The `transferOut()` method."]
486    #[doc = ""]
487    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferOut)"]
488    #[doc = ""]
489    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
490    #[doc = ""]
491    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
492    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
493    pub fn transfer_out_with_u8_slice(
494        this: &UsbDevice,
495        endpoint_number: u8,
496        data: &mut [u8],
497    ) -> Result<::js_sys::Promise, JsValue>;
498    #[cfg(web_sys_unstable_apis)]
499    # [wasm_bindgen (catch , method , structural , js_class = "USBDevice" , js_name = transferOut)]
500    #[doc = "The `transferOut()` method."]
501    #[doc = ""]
502    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/transferOut)"]
503    #[doc = ""]
504    #[doc = "*This API requires the following crate features to be activated: `UsbDevice`*"]
505    #[doc = ""]
506    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
507    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
508    pub fn transfer_out_with_u8_array(
509        this: &UsbDevice,
510        endpoint_number: u8,
511        data: &::js_sys::Uint8Array,
512    ) -> Result<::js_sys::Promise, JsValue>;
513}