From 3592b835c20c704bfc04f4bdfa95ebdb526d322d Mon Sep 17 00:00:00 2001 From: Benjamin Halsted Date: Sun, 13 Jun 2021 08:49:48 -0700 Subject: [PATCH] Rebased off of halzy/stable_downgrade --- crates/web-sys/src/features/gen_ReadableStream.rs | 6 ++++++ crates/web-sys/src/features/gen_ReadableWritablePair.rs | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/crates/web-sys/src/features/gen_ReadableStream.rs b/crates/web-sys/src/features/gen_ReadableStream.rs index ff0f3fe783a..6d3cc0e45dd 100644 --- a/crates/web-sys/src/features/gen_ReadableStream.rs +++ b/crates/web-sys/src/features/gen_ReadableStream.rs @@ -81,6 +81,9 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `WritableStream`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn pipe_to(this: &ReadableStream, destination: &WritableStream) -> ::js_sys::Promise; #[cfg(web_sys_unstable_apis)] #[cfg(all(feature = "StreamPipeOptions", feature = "WritableStream",))] @@ -90,6 +93,9 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `StreamPipeOptions`, `WritableStream`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn pipe_to_with_options( this: &ReadableStream, destination: &WritableStream, diff --git a/crates/web-sys/src/features/gen_ReadableWritablePair.rs b/crates/web-sys/src/features/gen_ReadableWritablePair.rs index 8a34d98aca5..0ce861e74ab 100644 --- a/crates/web-sys/src/features/gen_ReadableWritablePair.rs +++ b/crates/web-sys/src/features/gen_ReadableWritablePair.rs @@ -11,10 +11,14 @@ extern "C" { pub type ReadableWritablePair; } impl ReadableWritablePair { + #[cfg(web_sys_unstable_apis)] #[cfg(all(feature = "ReadableStream", feature = "WritableStream",))] #[doc = "Construct a new `ReadableWritablePair`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`, `WritableStream`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn new(readable: &ReadableStream, writable: &WritableStream) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); @@ -40,10 +44,14 @@ impl ReadableWritablePair { let _ = r; self } + #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WritableStream")] #[doc = "Change the `writable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn writable(&mut self, val: &WritableStream) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(