web_sys/features/
gen_UsbAlternateInterface.rs1#![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(
9 extends = "::js_sys::Object",
10 js_name = "USBAlternateInterface",
11 typescript_type = "USBAlternateInterface"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `UsbAlternateInterface` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`*"]
19 #[doc = ""]
20 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22 pub type UsbAlternateInterface;
23 #[cfg(web_sys_unstable_apis)]
24 #[wasm_bindgen(
25 method,
26 getter,
27 js_class = "USBAlternateInterface",
28 js_name = "alternateSetting"
29 )]
30 #[doc = "Getter for the `alternateSetting` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/alternateSetting)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`*"]
35 #[doc = ""]
36 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
38 pub fn alternate_setting(this: &UsbAlternateInterface) -> u8;
39 #[cfg(web_sys_unstable_apis)]
40 #[wasm_bindgen(
41 method,
42 getter,
43 js_class = "USBAlternateInterface",
44 js_name = "interfaceClass"
45 )]
46 #[doc = "Getter for the `interfaceClass` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/interfaceClass)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`*"]
51 #[doc = ""]
52 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54 pub fn interface_class(this: &UsbAlternateInterface) -> u8;
55 #[cfg(web_sys_unstable_apis)]
56 #[wasm_bindgen(
57 method,
58 getter,
59 js_class = "USBAlternateInterface",
60 js_name = "interfaceSubclass"
61 )]
62 #[doc = "Getter for the `interfaceSubclass` field of this object."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/interfaceSubclass)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`*"]
67 #[doc = ""]
68 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
69 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
70 pub fn interface_subclass(this: &UsbAlternateInterface) -> u8;
71 #[cfg(web_sys_unstable_apis)]
72 #[wasm_bindgen(
73 method,
74 getter,
75 js_class = "USBAlternateInterface",
76 js_name = "interfaceProtocol"
77 )]
78 #[doc = "Getter for the `interfaceProtocol` field of this object."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/interfaceProtocol)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`*"]
83 #[doc = ""]
84 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
86 pub fn interface_protocol(this: &UsbAlternateInterface) -> u8;
87 #[cfg(web_sys_unstable_apis)]
88 #[wasm_bindgen(
89 method,
90 getter,
91 js_class = "USBAlternateInterface",
92 js_name = "interfaceName"
93 )]
94 #[doc = "Getter for the `interfaceName` field of this object."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/interfaceName)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`*"]
99 #[doc = ""]
100 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
101 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
102 pub fn interface_name(this: &UsbAlternateInterface) -> Option<::alloc::string::String>;
103 #[cfg(web_sys_unstable_apis)]
104 #[cfg(feature = "UsbEndpoint")]
105 #[wasm_bindgen(
106 method,
107 getter,
108 js_class = "USBAlternateInterface",
109 js_name = "endpoints"
110 )]
111 #[doc = "Getter for the `endpoints` field of this object."]
112 #[doc = ""]
113 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/endpoints)"]
114 #[doc = ""]
115 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`, `UsbEndpoint`*"]
116 #[doc = ""]
117 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
118 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
119 pub fn endpoints(this: &UsbAlternateInterface) -> ::js_sys::Array<UsbEndpoint>;
120 #[cfg(web_sys_unstable_apis)]
121 #[cfg(feature = "UsbInterface")]
122 #[wasm_bindgen(catch, constructor, js_class = "USBAlternateInterface")]
123 #[doc = "The `new UsbAlternateInterface(..)` constructor, creating a new instance of `UsbAlternateInterface`."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBAlternateInterface/USBAlternateInterface)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `UsbAlternateInterface`, `UsbInterface`*"]
128 #[doc = ""]
129 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
130 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 pub fn new(
132 device_interface: &UsbInterface,
133 alternate_setting: u8,
134 ) -> Result<UsbAlternateInterface, JsValue>;
135}