maxcountryman_web_sys/features/
gen_WritableStream.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[cfg(web_sys_unstable_apis)]
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WritableStream , typescript_type = "WritableStream")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `WritableStream` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
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 WritableStream;
18    #[cfg(web_sys_unstable_apis)]
19    # [wasm_bindgen (structural , method , getter , js_class = "WritableStream" , js_name = locked)]
20    #[doc = "Getter for the `locked` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/locked)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
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 locked(this: &WritableStream) -> bool;
29    #[cfg(web_sys_unstable_apis)]
30    # [wasm_bindgen (method , structural , js_class = "WritableStream" , js_name = abort)]
31    #[doc = "The `abort()` method."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/abort)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
36    #[doc = ""]
37    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
38    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
39    pub fn abort(this: &WritableStream) -> ::js_sys::Promise;
40    #[cfg(web_sys_unstable_apis)]
41    # [wasm_bindgen (method , structural , js_class = "WritableStream" , js_name = abort)]
42    #[doc = "The `abort()` method."]
43    #[doc = ""]
44    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/abort)"]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
50    pub fn abort_with_reason(
51        this: &WritableStream,
52        reason: &::wasm_bindgen::JsValue,
53    ) -> ::js_sys::Promise;
54    #[cfg(web_sys_unstable_apis)]
55    # [wasm_bindgen (method , structural , js_class = "WritableStream" , js_name = close)]
56    #[doc = "The `close()` method."]
57    #[doc = ""]
58    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/close)"]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
61    #[doc = ""]
62    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
64    pub fn close(this: &WritableStream) -> ::js_sys::Promise;
65    #[cfg(web_sys_unstable_apis)]
66    #[cfg(feature = "WritableStreamDefaultWriter")]
67    # [wasm_bindgen (method , structural , js_class = "WritableStream" , js_name = getWriter)]
68    #[doc = "The `getWriter()` method."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/getWriter)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `WritableStream`, `WritableStreamDefaultWriter`*"]
73    #[doc = ""]
74    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
76    pub fn get_writer(this: &WritableStream) -> WritableStreamDefaultWriter;
77}