1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WritableStreamDefaultWriter , typescript_type = "WritableStreamDefaultWriter" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `WritableStreamDefaultWriter` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
14 | pub type WritableStreamDefaultWriter; |
15 | # [wasm_bindgen (structural , method , getter , js_class = "WritableStreamDefaultWriter" , js_name = closed)] |
16 | #[doc = "Getter for the `closed` field of this object." ] |
17 | #[doc = "" ] |
18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/closed)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
21 | pub fn closed(this: &WritableStreamDefaultWriter) -> ::js_sys::Promise; |
22 | # [wasm_bindgen (structural , catch , method , getter , js_class = "WritableStreamDefaultWriter" , js_name = desiredSize)] |
23 | #[doc = "Getter for the `desiredSize` field of this object." ] |
24 | #[doc = "" ] |
25 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/desiredSize)" ] |
26 | #[doc = "" ] |
27 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
28 | pub fn desired_size(this: &WritableStreamDefaultWriter) -> Result<Option<f64>, JsValue>; |
29 | # [wasm_bindgen (structural , method , getter , js_class = "WritableStreamDefaultWriter" , js_name = ready)] |
30 | #[doc = "Getter for the `ready` field of this object." ] |
31 | #[doc = "" ] |
32 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/ready)" ] |
33 | #[doc = "" ] |
34 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
35 | pub fn ready(this: &WritableStreamDefaultWriter) -> ::js_sys::Promise; |
36 | #[cfg (feature = "WritableStream" )] |
37 | #[wasm_bindgen (catch, constructor, js_class = "WritableStreamDefaultWriter" )] |
38 | #[doc = "The `new WritableStreamDefaultWriter(..)` constructor, creating a new instance of `WritableStreamDefaultWriter`." ] |
39 | #[doc = "" ] |
40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/WritableStreamDefaultWriter)" ] |
41 | #[doc = "" ] |
42 | #[doc = "*This API requires the following crate features to be activated: `WritableStream`, `WritableStreamDefaultWriter`*" ] |
43 | pub fn new(stream: &WritableStream) -> Result<WritableStreamDefaultWriter, JsValue>; |
44 | # [wasm_bindgen (method , structural , js_class = "WritableStreamDefaultWriter" , js_name = abort)] |
45 | #[doc = "The `abort()` method." ] |
46 | #[doc = "" ] |
47 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/abort)" ] |
48 | #[doc = "" ] |
49 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
50 | pub fn abort(this: &WritableStreamDefaultWriter) -> ::js_sys::Promise; |
51 | # [wasm_bindgen (method , structural , js_class = "WritableStreamDefaultWriter" , js_name = abort)] |
52 | #[doc = "The `abort()` method." ] |
53 | #[doc = "" ] |
54 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/abort)" ] |
55 | #[doc = "" ] |
56 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
57 | pub fn abort_with_reason( |
58 | this: &WritableStreamDefaultWriter, |
59 | reason: &::wasm_bindgen::JsValue, |
60 | ) -> ::js_sys::Promise; |
61 | # [wasm_bindgen (method , structural , js_class = "WritableStreamDefaultWriter" , js_name = close)] |
62 | #[doc = "The `close()` method." ] |
63 | #[doc = "" ] |
64 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/close)" ] |
65 | #[doc = "" ] |
66 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
67 | pub fn close(this: &WritableStreamDefaultWriter) -> ::js_sys::Promise; |
68 | # [wasm_bindgen (method , structural , js_class = "WritableStreamDefaultWriter" , js_name = releaseLock)] |
69 | #[doc = "The `releaseLock()` method." ] |
70 | #[doc = "" ] |
71 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/releaseLock)" ] |
72 | #[doc = "" ] |
73 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
74 | pub fn release_lock(this: &WritableStreamDefaultWriter); |
75 | # [wasm_bindgen (method , structural , js_class = "WritableStreamDefaultWriter" , js_name = write)] |
76 | #[doc = "The `write()` method." ] |
77 | #[doc = "" ] |
78 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/write)" ] |
79 | #[doc = "" ] |
80 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
81 | pub fn write(this: &WritableStreamDefaultWriter) -> ::js_sys::Promise; |
82 | # [wasm_bindgen (method , structural , js_class = "WritableStreamDefaultWriter" , js_name = write)] |
83 | #[doc = "The `write()` method." ] |
84 | #[doc = "" ] |
85 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter/write)" ] |
86 | #[doc = "" ] |
87 | #[doc = "*This API requires the following crate features to be activated: `WritableStreamDefaultWriter`*" ] |
88 | pub fn write_with_chunk( |
89 | this: &WritableStreamDefaultWriter, |
90 | chunk: &::wasm_bindgen::JsValue, |
91 | ) -> ::js_sys::Promise; |
92 | } |
93 | |