Skip to main content

web_sys/features/
gen_UsbInTransferResult.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(
9        extends = "::js_sys::Object",
10        js_name = "USBInTransferResult",
11        typescript_type = "USBInTransferResult"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `UsbInTransferResult` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `UsbInTransferResult`*"]
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 UsbInTransferResult;
23    #[cfg(web_sys_unstable_apis)]
24    #[wasm_bindgen(method, getter, js_class = "USBInTransferResult", js_name = "data")]
25    #[doc = "Getter for the `data` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult/data)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `UsbInTransferResult`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    pub fn data(this: &UsbInTransferResult) -> Option<::js_sys::DataView>;
34    #[cfg(web_sys_unstable_apis)]
35    #[cfg(feature = "UsbTransferStatus")]
36    #[wasm_bindgen(method, getter, js_class = "USBInTransferResult", js_name = "status")]
37    #[doc = "Getter for the `status` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult/status)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `UsbInTransferResult`, `UsbTransferStatus`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    pub fn status(this: &UsbInTransferResult) -> UsbTransferStatus;
46    #[cfg(web_sys_unstable_apis)]
47    #[cfg(feature = "UsbTransferStatus")]
48    #[wasm_bindgen(catch, constructor, js_class = "USBInTransferResult")]
49    #[doc = "The `new UsbInTransferResult(..)` constructor, creating a new instance of `UsbInTransferResult`."]
50    #[doc = ""]
51    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult/USBInTransferResult)"]
52    #[doc = ""]
53    #[doc = "*This API requires the following crate features to be activated: `UsbInTransferResult`, `UsbTransferStatus`*"]
54    #[doc = ""]
55    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
57    pub fn new(status: UsbTransferStatus) -> Result<UsbInTransferResult, JsValue>;
58    #[cfg(web_sys_unstable_apis)]
59    #[cfg(feature = "UsbTransferStatus")]
60    #[wasm_bindgen(catch, constructor, js_class = "USBInTransferResult")]
61    #[doc = "The `new UsbInTransferResult(..)` constructor, creating a new instance of `UsbInTransferResult`."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/USBInTransferResult/USBInTransferResult)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `UsbInTransferResult`, `UsbTransferStatus`*"]
66    #[doc = ""]
67    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
69    pub fn new_with_data(
70        status: UsbTransferStatus,
71        data: Option<&::js_sys::DataView>,
72    ) -> Result<UsbInTransferResult, JsValue>;
73}