maxcountryman_web_sys/features/
gen_ReadableStream.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ReadableStream , typescript_type = "ReadableStream")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `ReadableStream` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
13 pub type ReadableStream;
14 # [wasm_bindgen (structural , method , getter , js_class = "ReadableStream" , js_name = locked)]
15 #[doc = "Getter for the `locked` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/locked)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
20 pub fn locked(this: &ReadableStream) -> bool;
21 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = cancel)]
22 #[doc = "The `cancel()` method."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/cancel)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
27 pub fn cancel(this: &ReadableStream) -> ::js_sys::Promise;
28 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = cancel)]
29 #[doc = "The `cancel()` method."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/cancel)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
34 pub fn cancel_with_reason(
35 this: &ReadableStream,
36 reason: &::wasm_bindgen::JsValue,
37 ) -> ::js_sys::Promise;
38 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = getReader)]
39 #[doc = "The `getReader()` method."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
44 pub fn get_reader(this: &ReadableStream) -> ::js_sys::Object;
45 #[cfg(feature = "ReadableStreamGetReaderOptions")]
46 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = getReader)]
47 #[doc = "The `getReader()` method."]
48 #[doc = ""]
49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader)"]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableStreamGetReaderOptions`*"]
52 pub fn get_reader_with_options(
53 this: &ReadableStream,
54 options: &ReadableStreamGetReaderOptions,
55 ) -> ::js_sys::Object;
56 #[cfg(feature = "ReadableWritablePair")]
57 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeThrough)]
58 #[doc = "The `pipeThrough()` method."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"]
63 pub fn pipe_through(this: &ReadableStream, transform: &ReadableWritablePair) -> ReadableStream;
64 #[cfg(all(feature = "ReadableWritablePair", feature = "StreamPipeOptions",))]
65 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeThrough)]
66 #[doc = "The `pipeThrough()` method."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`, `StreamPipeOptions`*"]
71 pub fn pipe_through_with_options(
72 this: &ReadableStream,
73 transform: &ReadableWritablePair,
74 options: &StreamPipeOptions,
75 ) -> ReadableStream;
76 #[cfg(web_sys_unstable_apis)]
77 #[cfg(feature = "WritableStream")]
78 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeTo)]
79 #[doc = "The `pipeTo()` method."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `WritableStream`*"]
84 #[doc = ""]
85 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 pub fn pipe_to(this: &ReadableStream, destination: &WritableStream) -> ::js_sys::Promise;
88 #[cfg(web_sys_unstable_apis)]
89 #[cfg(all(feature = "StreamPipeOptions", feature = "WritableStream",))]
90 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = pipeTo)]
91 #[doc = "The `pipeTo()` method."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `StreamPipeOptions`, `WritableStream`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 pub fn pipe_to_with_options(
100 this: &ReadableStream,
101 destination: &WritableStream,
102 options: &StreamPipeOptions,
103 ) -> ::js_sys::Promise;
104 # [wasm_bindgen (method , structural , js_class = "ReadableStream" , js_name = tee)]
105 #[doc = "The `tee()` method."]
106 #[doc = ""]
107 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee)"]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
110 pub fn tee(this: &ReadableStream) -> ::js_sys::Array;
111}