1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = TransformStream , typescript_type = "TransformStream")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TransformStream` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
14 pub type TransformStream;
15 #[cfg(feature = "ReadableStream")]
16 # [wasm_bindgen (structural , method , getter , js_class = "TransformStream" , js_name = readable)]
17 #[doc = "Getter for the `readable` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/readable)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `TransformStream`*"]
22 pub fn readable(this: &TransformStream) -> ReadableStream;
23 #[cfg(feature = "WritableStream")]
24 # [wasm_bindgen (structural , method , getter , js_class = "TransformStream" , js_name = writable)]
25 #[doc = "Getter for the `writable` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/writable)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `TransformStream`, `WritableStream`*"]
30 pub fn writable(this: &TransformStream) -> WritableStream;
31 #[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
32 #[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
37 pub fn new() -> Result<TransformStream, JsValue>;
38 #[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
39 #[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
44 pub fn new_with_transformer(transformer: &::js_sys::Object)
45 -> Result<TransformStream, JsValue>;
46 #[cfg(feature = "QueuingStrategy")]
47 #[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
48 #[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `TransformStream`*"]
53 pub fn new_with_transformer_and_writable_strategy(
54 transformer: &::js_sys::Object,
55 writable_strategy: &QueuingStrategy,
56 ) -> Result<TransformStream, JsValue>;
57 #[cfg(feature = "QueuingStrategy")]
58 #[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
59 #[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `TransformStream`*"]
64 pub fn new_with_transformer_and_writable_strategy_and_readable_strategy(
65 transformer: &::js_sys::Object,
66 writable_strategy: &QueuingStrategy,
67 readable_strategy: &QueuingStrategy,
68 ) -> Result<TransformStream, JsValue>;
69}
70