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 = ReadableStreamDefaultReader , typescript_type = "ReadableStreamDefaultReader" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `ReadableStreamDefaultReader` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamDefaultReader`*" ] |
14 | pub type ReadableStreamDefaultReader; |
15 | # [wasm_bindgen (structural , method , getter , js_class = "ReadableStreamDefaultReader" , 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/ReadableStreamDefaultReader/closed)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamDefaultReader`*" ] |
21 | pub fn closed(this: &ReadableStreamDefaultReader) -> ::js_sys::Promise; |
22 | #[cfg (feature = "ReadableStream" )] |
23 | #[wasm_bindgen (catch, constructor, js_class = "ReadableStreamDefaultReader" )] |
24 | #[doc = "The `new ReadableStreamDefaultReader(..)` constructor, creating a new instance of `ReadableStreamDefaultReader`." ] |
25 | #[doc = "" ] |
26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/ReadableStreamDefaultReader)" ] |
27 | #[doc = "" ] |
28 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableStreamDefaultReader`*" ] |
29 | pub fn new(stream: &ReadableStream) -> Result<ReadableStreamDefaultReader, JsValue>; |
30 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamDefaultReader" , js_name = read)] |
31 | #[doc = "The `read()` method." ] |
32 | #[doc = "" ] |
33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/read)" ] |
34 | #[doc = "" ] |
35 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamDefaultReader`*" ] |
36 | pub fn read(this: &ReadableStreamDefaultReader) -> ::js_sys::Promise; |
37 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamDefaultReader" , js_name = releaseLock)] |
38 | #[doc = "The `releaseLock()` method." ] |
39 | #[doc = "" ] |
40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/releaseLock)" ] |
41 | #[doc = "" ] |
42 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamDefaultReader`*" ] |
43 | pub fn release_lock(this: &ReadableStreamDefaultReader); |
44 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamDefaultReader" , js_name = cancel)] |
45 | #[doc = "The `cancel()` method." ] |
46 | #[doc = "" ] |
47 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/cancel)" ] |
48 | #[doc = "" ] |
49 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamDefaultReader`*" ] |
50 | pub fn cancel(this: &ReadableStreamDefaultReader) -> ::js_sys::Promise; |
51 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamDefaultReader" , js_name = cancel)] |
52 | #[doc = "The `cancel()` method." ] |
53 | #[doc = "" ] |
54 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/cancel)" ] |
55 | #[doc = "" ] |
56 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamDefaultReader`*" ] |
57 | pub fn cancel_with_reason( |
58 | this: &ReadableStreamDefaultReader, |
59 | reason: &::wasm_bindgen::JsValue, |
60 | ) -> ::js_sys::Promise; |
61 | } |
62 | |