1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | unsafeextern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ReadableStream , typescript_type = "ReadableStream" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `ReadableStream` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
14 | pub type ReadableStream; |
15 | # [wasm_bindgen (structural , method , getter , js_class = "ReadableStream" , js_name = locked)] |
16 | #[doc = "Getter for the `locked` field of this object." ] |
17 | #[doc = "" ] |
18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/locked)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
21 | pub unsafefn locked(this: &ReadableStream) -> bool; |
22 | #[wasm_bindgen (catch, constructor, js_class = "ReadableStream" )] |
23 | #[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`." ] |
24 | #[doc = "" ] |
25 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)" ] |
26 | #[doc = "" ] |
27 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
28 | pub unsafefn new() -> Result<ReadableStream, JsValue>; |
29 | #[wasm_bindgen (catch, constructor, js_class = "ReadableStream" )] |
30 | #[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`." ] |
31 | #[doc = "" ] |
32 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)" ] |
33 | #[doc = "" ] |
34 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
35 | pub unsafefn new_with_underlying_source( |
36 | underlying_source: &::js_sys::Object, |
37 | ) -> Result<ReadableStream, JsValue>; |
38 | #[cfg (feature = "QueuingStrategy" )] |
39 | #[wasm_bindgen (catch, constructor, js_class = "ReadableStream" )] |
40 | #[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`." ] |
41 | #[doc = "" ] |
42 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)" ] |
43 | #[doc = "" ] |
44 | #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `ReadableStream`*" ] |
45 | pub unsafefn new_with_underlying_source_and_strategy( |
46 | underlying_source: &::js_sys::Object, |
47 | strategy: &QueuingStrategy, |
48 | ) -> Result<ReadableStream, JsValue>; |
49 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = cancel)] |
50 | #[doc = "The `cancel()` method." ] |
51 | #[doc = "" ] |
52 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/cancel)" ] |
53 | #[doc = "" ] |
54 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
55 | pub unsafefn cancel(this: &ReadableStream) -> ::js_sys::Promise; |
56 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = cancel)] |
57 | #[doc = "The `cancel()` method." ] |
58 | #[doc = "" ] |
59 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/cancel)" ] |
60 | #[doc = "" ] |
61 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
62 | pub unsafefn cancel_with_reason( |
63 | this: &ReadableStream, |
64 | reason: &::wasm_bindgen::JsValue, |
65 | ) -> ::js_sys::Promise; |
66 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = entries)] |
67 | #[doc = "The `entries()` method." ] |
68 | #[doc = "" ] |
69 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/entries)" ] |
70 | #[doc = "" ] |
71 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
72 | pub unsafefn entries(this: &ReadableStream) -> ::js_sys::AsyncIterator; |
73 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = getReader)] |
74 | #[doc = "The `getReader()` method." ] |
75 | #[doc = "" ] |
76 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader)" ] |
77 | #[doc = "" ] |
78 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
79 | pub unsafefn get_reader(this: &ReadableStream) -> ::js_sys::Object; |
80 | #[cfg (feature = "ReadableStreamGetReaderOptions" )] |
81 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = getReader)] |
82 | #[doc = "The `getReader()` method." ] |
83 | #[doc = "" ] |
84 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader)" ] |
85 | #[doc = "" ] |
86 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableStreamGetReaderOptions`*" ] |
87 | pub unsafefn get_reader_with_options( |
88 | this: &ReadableStream, |
89 | options: &ReadableStreamGetReaderOptions, |
90 | ) -> ::js_sys::Object; |
91 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = keys)] |
92 | #[doc = "The `keys()` method." ] |
93 | #[doc = "" ] |
94 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/keys)" ] |
95 | #[doc = "" ] |
96 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
97 | pub unsafefn keys(this: &ReadableStream) -> ::js_sys::AsyncIterator; |
98 | #[cfg (feature = "ReadableWritablePair" )] |
99 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeThrough)] |
100 | #[doc = "The `pipeThrough()` method." ] |
101 | #[doc = "" ] |
102 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough)" ] |
103 | #[doc = "" ] |
104 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*" ] |
105 | pub unsafefn pipe_through(this: &ReadableStream, transform: &ReadableWritablePair) -> ReadableStream; |
106 | #[cfg (all(feature = "ReadableWritablePair" , feature = "StreamPipeOptions" ,))] |
107 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeThrough)] |
108 | #[doc = "The `pipeThrough()` method." ] |
109 | #[doc = "" ] |
110 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough)" ] |
111 | #[doc = "" ] |
112 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`, `StreamPipeOptions`*" ] |
113 | pub unsafefn pipe_through_with_options( |
114 | this: &ReadableStream, |
115 | transform: &ReadableWritablePair, |
116 | options: &StreamPipeOptions, |
117 | ) -> ReadableStream; |
118 | #[cfg (feature = "WritableStream" )] |
119 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeTo)] |
120 | #[doc = "The `pipeTo()` method." ] |
121 | #[doc = "" ] |
122 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo)" ] |
123 | #[doc = "" ] |
124 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `WritableStream`*" ] |
125 | pub unsafefn pipe_to(this: &ReadableStream, destination: &WritableStream) -> ::js_sys::Promise; |
126 | #[cfg (all(feature = "StreamPipeOptions" , feature = "WritableStream" ,))] |
127 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeTo)] |
128 | #[doc = "The `pipeTo()` method." ] |
129 | #[doc = "" ] |
130 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo)" ] |
131 | #[doc = "" ] |
132 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `StreamPipeOptions`, `WritableStream`*" ] |
133 | pub unsafefn pipe_to_with_options( |
134 | this: &ReadableStream, |
135 | destination: &WritableStream, |
136 | options: &StreamPipeOptions, |
137 | ) -> ::js_sys::Promise; |
138 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = tee)] |
139 | #[doc = "The `tee()` method." ] |
140 | #[doc = "" ] |
141 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee)" ] |
142 | #[doc = "" ] |
143 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
144 | pub unsafefn tee(this: &ReadableStream) -> ::js_sys::Array; |
145 | # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = values)] |
146 | #[doc = "The `values()` method." ] |
147 | #[doc = "" ] |
148 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/values)" ] |
149 | #[doc = "" ] |
150 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*" ] |
151 | pub unsafefn values(this: &ReadableStream) -> ::js_sys::AsyncIterator; |
152 | } |
153 | |