web_sys/features/
gen_WebTransportError.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 = "DomException",
10 extends = "::js_sys::Object",
11 js_name = "WebTransportError",
12 typescript_type = "WebTransportError"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `WebTransportError` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `WebTransportError`*"]
20 #[doc = ""]
21 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23 pub type WebTransportError;
24 #[cfg(web_sys_unstable_apis)]
25 #[cfg(feature = "WebTransportErrorSource")]
26 #[wasm_bindgen(method, getter, js_class = "WebTransportError", js_name = "source")]
27 #[doc = "Getter for the `source` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError/source)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `WebTransportError`, `WebTransportErrorSource`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 pub fn source(this: &WebTransportError) -> WebTransportErrorSource;
36 #[cfg(web_sys_unstable_apis)]
37 #[wasm_bindgen(
38 method,
39 getter,
40 js_class = "WebTransportError",
41 js_name = "streamErrorCode"
42 )]
43 #[doc = "Getter for the `streamErrorCode` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError/streamErrorCode)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `WebTransportError`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 pub fn stream_error_code(this: &WebTransportError) -> Option<u8>;
52 #[cfg(web_sys_unstable_apis)]
53 #[wasm_bindgen(catch, constructor, js_class = "WebTransportError")]
54 #[doc = "The `new WebTransportError(..)` constructor, creating a new instance of `WebTransportError`."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError/WebTransportError)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `WebTransportError`*"]
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() -> Result<WebTransportError, JsValue>;
63 #[cfg(web_sys_unstable_apis)]
64 #[wasm_bindgen(catch, constructor, js_class = "WebTransportError")]
65 #[doc = "The `new WebTransportError(..)` constructor, creating a new instance of `WebTransportError`."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError/WebTransportError)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `WebTransportError`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
73 pub fn new_with_message(message: &str) -> Result<WebTransportError, JsValue>;
74 #[cfg(web_sys_unstable_apis)]
75 #[cfg(feature = "WebTransportErrorOptions")]
76 #[wasm_bindgen(catch, constructor, js_class = "WebTransportError")]
77 #[doc = "The `new WebTransportError(..)` constructor, creating a new instance of `WebTransportError`."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError/WebTransportError)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `WebTransportError`, `WebTransportErrorOptions`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 pub fn new_with_message_and_options(
86 message: &str,
87 options: &WebTransportErrorOptions,
88 ) -> Result<WebTransportError, JsValue>;
89}