web_sys/features/
gen_CompressionStream.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 #[wasm_bindgen(
9 extends = "::js_sys::Object",
10 js_name = "CompressionStream",
11 typescript_type = "CompressionStream"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `CompressionStream` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `CompressionStream`*"]
19 #[doc = ""]
20 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22 pub type CompressionStream;
23 #[cfg(web_sys_unstable_apis)]
24 #[cfg(feature = "ReadableStream")]
25 #[wasm_bindgen(method, getter, js_class = "CompressionStream", js_name = "readable")]
26 #[doc = "Getter for the `readable` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream/readable)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `CompressionStream`, `ReadableStream`*"]
31 #[doc = ""]
32 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 pub fn readable(this: &CompressionStream) -> ReadableStream;
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "WritableStream")]
37 #[wasm_bindgen(method, getter, js_class = "CompressionStream", js_name = "writable")]
38 #[doc = "Getter for the `writable` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream/writable)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `CompressionStream`, `WritableStream`*"]
43 #[doc = ""]
44 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
45 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 pub fn writable(this: &CompressionStream) -> WritableStream;
47 #[cfg(web_sys_unstable_apis)]
48 #[cfg(feature = "CompressionFormat")]
49 #[wasm_bindgen(catch, constructor, js_class = "CompressionStream")]
50 #[doc = "The `new CompressionStream(..)` constructor, creating a new instance of `CompressionStream`."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream/CompressionStream)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `CompressionFormat`, `CompressionStream`*"]
55 #[doc = ""]
56 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
58 pub fn new(format: CompressionFormat) -> Result<CompressionStream, JsValue>;
59}