]> git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_UsbEndpoint.rs
New upstream version 1.71.1+dfsg1
[rustc.git] / vendor / web-sys / src / features / gen_UsbEndpoint.rs
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 = USBEndpoint , typescript_type = "USBEndpoint")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `UsbEndpoint` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `UsbEndpoint`*"]
14 #[doc = ""]
15 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17 pub type UsbEndpoint;
18 #[cfg(web_sys_unstable_apis)]
19 # [wasm_bindgen (structural , method , getter , js_class = "USBEndpoint" , js_name = endpointNumber)]
20 #[doc = "Getter for the `endpointNumber` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint/endpointNumber)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `UsbEndpoint`*"]
25 #[doc = ""]
26 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
28 pub fn endpoint_number(this: &UsbEndpoint) -> u8;
29 #[cfg(web_sys_unstable_apis)]
30 #[cfg(feature = "UsbDirection")]
31 # [wasm_bindgen (structural , method , getter , js_class = "USBEndpoint" , js_name = direction)]
32 #[doc = "Getter for the `direction` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint/direction)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `UsbDirection`, `UsbEndpoint`*"]
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 direction(this: &UsbEndpoint) -> UsbDirection;
41 #[cfg(web_sys_unstable_apis)]
42 #[cfg(feature = "UsbEndpointType")]
43 # [wasm_bindgen (structural , method , getter , js_class = "USBEndpoint" , js_name = type)]
44 #[doc = "Getter for the `type` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint/type)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `UsbEndpoint`, `UsbEndpointType`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 pub fn type_(this: &UsbEndpoint) -> UsbEndpointType;
53 #[cfg(web_sys_unstable_apis)]
54 # [wasm_bindgen (structural , method , getter , js_class = "USBEndpoint" , js_name = packetSize)]
55 #[doc = "Getter for the `packetSize` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint/packetSize)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `UsbEndpoint`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 pub fn packet_size(this: &UsbEndpoint) -> u32;
64 #[cfg(web_sys_unstable_apis)]
65 #[cfg(all(feature = "UsbAlternateInterface", feature = "UsbDirection",))]
66 #[wasm_bindgen(catch, constructor, js_class = "USBEndpoint")]
67 #[doc = "The `new UsbEndpoint(..)` constructor, creating a new instance of `UsbEndpoint`."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBEndpoint/USBEndpoint)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`, `UsbDirection`, `UsbEndpoint`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 pub fn new(
76 alternate: &UsbAlternateInterface,
77 endpoint_number: u8,
78 direction: UsbDirection,
79 ) -> Result<UsbEndpoint, JsValue>;
80 }