Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize QueuingStrategy #3753

Merged
merged 1 commit into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* Stabilize File System API.
[#3745](https://github.com/rustwasm/wasm-bindgen/pull/3745)

* Stabilize `QueuingStrategy`.
[#3753](https://github.com/rustwasm/wasm-bindgen/pull/3753)

### Fixed

* Fixed a compiler error when using `#[wasm_bindgen]` inside `macro_rules!`.
Expand Down
17 changes: 0 additions & 17 deletions crates/web-sys/src/features/gen_QueuingStrategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,27 @@
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = QueuingStrategy)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `QueuingStrategy` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
#[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 type QueuingStrategy;
}
#[cfg(web_sys_unstable_apis)]
impl QueuingStrategy {
#[doc = "Construct a new `QueuingStrategy`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
#[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() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `highWaterMark` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
#[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 high_water_mark(&mut self, val: f64) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
Expand All @@ -49,13 +37,9 @@ impl QueuingStrategy {
let _ = r;
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `size` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
#[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 size(&mut self, val: &::js_sys::Function) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("size"), &JsValue::from(val));
Expand All @@ -67,7 +51,6 @@ impl QueuingStrategy {
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for QueuingStrategy {
fn default() -> Self {
Self::new()
Expand Down
12 changes: 0 additions & 12 deletions crates/web-sys/src/features/gen_ReadableStream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,29 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
pub fn locked(this: &ReadableStream) -> bool;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "ReadableStream")]
#[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
#[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() -> Result<ReadableStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "ReadableStream")]
#[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
#[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_with_underlying_source(
underlying_source: &::js_sys::Object,
) -> Result<ReadableStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "QueuingStrategy")]
#[wasm_bindgen(catch, constructor, js_class = "ReadableStream")]
#[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `ReadableStream`*"]
#[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_with_underlying_source_and_strategy(
underlying_source: &::js_sys::Object,
strategy: &QueuingStrategy,
Expand Down
16 changes: 0 additions & 16 deletions crates/web-sys/src/features/gen_TransformStream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,55 +28,39 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TransformStream`, `WritableStream`*"]
pub fn writable(this: &TransformStream) -> WritableStream;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
#[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() -> Result<TransformStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
#[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_with_transformer(transformer: &::js_sys::Object)
-> Result<TransformStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "QueuingStrategy")]
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `TransformStream`*"]
#[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_with_transformer_and_writable_strategy(
transformer: &::js_sys::Object,
writable_strategy: &QueuingStrategy,
) -> Result<TransformStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "QueuingStrategy")]
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `TransformStream`*"]
#[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_with_transformer_and_writable_strategy_and_readable_strategy(
transformer: &::js_sys::Object,
writable_strategy: &QueuingStrategy,
Expand Down
12 changes: 0 additions & 12 deletions crates/web-sys/src/features/gen_WritableStream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,29 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
pub fn locked(this: &WritableStream) -> bool;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "WritableStream")]
#[doc = "The `new WritableStream(..)` constructor, creating a new instance of `WritableStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/WritableStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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() -> Result<WritableStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "WritableStream")]
#[doc = "The `new WritableStream(..)` constructor, creating a new instance of `WritableStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/WritableStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `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_with_underlying_sink(
underlying_sink: &::js_sys::Object,
) -> Result<WritableStream, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "QueuingStrategy")]
#[wasm_bindgen(catch, constructor, js_class = "WritableStream")]
#[doc = "The `new WritableStream(..)` constructor, creating a new instance of `WritableStream`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/WritableStream)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `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_with_underlying_sink_and_strategy(
underlying_sink: &::js_sys::Object,
strategy: &QueuingStrategy,
Expand Down
15 changes: 0 additions & 15 deletions crates/web-sys/webidls/unstable/QueuingStrategy.webidl

This file was deleted.