Skip to main content

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