Skip to content

Commit c0ee195

Browse files
authored
Stabilize QueuingStrategy (#3753)
1 parent 0069b66 commit c0ee195

File tree

6 files changed

+3
-72
lines changed

6 files changed

+3
-72
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
* Stabilize File System API.
2828
[#3745](https://github.com/rustwasm/wasm-bindgen/pull/3745)
2929

30+
* Stabilize `QueuingStrategy`.
31+
[#3753](https://github.com/rustwasm/wasm-bindgen/pull/3753)
32+
3033
### Fixed
3134

3235
* Fixed a compiler error when using `#[wasm_bindgen]` inside `macro_rules!`.

crates/web-sys/src/features/gen_QueuingStrategy.rs

-17
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,27 @@
22
#![allow(clippy::all)]
33
use super::*;
44
use wasm_bindgen::prelude::*;
5-
#[cfg(web_sys_unstable_apis)]
65
#[wasm_bindgen]
76
extern "C" {
87
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = QueuingStrategy)]
98
#[derive(Debug, Clone, PartialEq, Eq)]
109
#[doc = "The `QueuingStrategy` dictionary."]
1110
#[doc = ""]
1211
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
13-
#[doc = ""]
14-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
1612
pub type QueuingStrategy;
1713
}
18-
#[cfg(web_sys_unstable_apis)]
1914
impl QueuingStrategy {
2015
#[doc = "Construct a new `QueuingStrategy`."]
2116
#[doc = ""]
2217
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
23-
#[doc = ""]
24-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
25-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
2618
pub fn new() -> Self {
2719
#[allow(unused_mut)]
2820
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
2921
ret
3022
}
31-
#[cfg(web_sys_unstable_apis)]
3223
#[doc = "Change the `highWaterMark` field of this object."]
3324
#[doc = ""]
3425
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
35-
#[doc = ""]
36-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
3826
pub fn high_water_mark(&mut self, val: f64) -> &mut Self {
3927
use wasm_bindgen::JsValue;
4028
let r = ::js_sys::Reflect::set(
@@ -49,13 +37,9 @@ impl QueuingStrategy {
4937
let _ = r;
5038
self
5139
}
52-
#[cfg(web_sys_unstable_apis)]
5340
#[doc = "Change the `size` field of this object."]
5441
#[doc = ""]
5542
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"]
56-
#[doc = ""]
57-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
58-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
5943
pub fn size(&mut self, val: &::js_sys::Function) -> &mut Self {
6044
use wasm_bindgen::JsValue;
6145
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("size"), &JsValue::from(val));
@@ -67,7 +51,6 @@ impl QueuingStrategy {
6751
self
6852
}
6953
}
70-
#[cfg(web_sys_unstable_apis)]
7154
impl Default for QueuingStrategy {
7255
fn default() -> Self {
7356
Self::new()

crates/web-sys/src/features/gen_ReadableStream.rs

-12
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,29 @@ extern "C" {
1919
#[doc = ""]
2020
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
2121
pub fn locked(this: &ReadableStream) -> bool;
22-
#[cfg(web_sys_unstable_apis)]
2322
#[wasm_bindgen(catch, constructor, js_class = "ReadableStream")]
2423
#[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`."]
2524
#[doc = ""]
2625
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)"]
2726
#[doc = ""]
2827
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
29-
#[doc = ""]
30-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
31-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
3228
pub fn new() -> Result<ReadableStream, JsValue>;
33-
#[cfg(web_sys_unstable_apis)]
3429
#[wasm_bindgen(catch, constructor, js_class = "ReadableStream")]
3530
#[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`."]
3631
#[doc = ""]
3732
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)"]
3833
#[doc = ""]
3934
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`*"]
40-
#[doc = ""]
41-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
4335
pub fn new_with_underlying_source(
4436
underlying_source: &::js_sys::Object,
4537
) -> Result<ReadableStream, JsValue>;
46-
#[cfg(web_sys_unstable_apis)]
4738
#[cfg(feature = "QueuingStrategy")]
4839
#[wasm_bindgen(catch, constructor, js_class = "ReadableStream")]
4940
#[doc = "The `new ReadableStream(..)` constructor, creating a new instance of `ReadableStream`."]
5041
#[doc = ""]
5142
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)"]
5243
#[doc = ""]
5344
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `ReadableStream`*"]
54-
#[doc = ""]
55-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
5745
pub fn new_with_underlying_source_and_strategy(
5846
underlying_source: &::js_sys::Object,
5947
strategy: &QueuingStrategy,

crates/web-sys/src/features/gen_TransformStream.rs

-16
Original file line numberDiff line numberDiff line change
@@ -28,55 +28,39 @@ extern "C" {
2828
#[doc = ""]
2929
#[doc = "*This API requires the following crate features to be activated: `TransformStream`, `WritableStream`*"]
3030
pub fn writable(this: &TransformStream) -> WritableStream;
31-
#[cfg(web_sys_unstable_apis)]
3231
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
3332
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
3433
#[doc = ""]
3534
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
3635
#[doc = ""]
3736
#[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
38-
#[doc = ""]
39-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
4137
pub fn new() -> Result<TransformStream, JsValue>;
42-
#[cfg(web_sys_unstable_apis)]
4338
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
4439
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
4540
#[doc = ""]
4641
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
4742
#[doc = ""]
4843
#[doc = "*This API requires the following crate features to be activated: `TransformStream`*"]
49-
#[doc = ""]
50-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
5244
pub fn new_with_transformer(transformer: &::js_sys::Object)
5345
-> Result<TransformStream, JsValue>;
54-
#[cfg(web_sys_unstable_apis)]
5546
#[cfg(feature = "QueuingStrategy")]
5647
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
5748
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
5849
#[doc = ""]
5950
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
6051
#[doc = ""]
6152
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `TransformStream`*"]
62-
#[doc = ""]
63-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
6553
pub fn new_with_transformer_and_writable_strategy(
6654
transformer: &::js_sys::Object,
6755
writable_strategy: &QueuingStrategy,
6856
) -> Result<TransformStream, JsValue>;
69-
#[cfg(web_sys_unstable_apis)]
7057
#[cfg(feature = "QueuingStrategy")]
7158
#[wasm_bindgen(catch, constructor, js_class = "TransformStream")]
7259
#[doc = "The `new TransformStream(..)` constructor, creating a new instance of `TransformStream`."]
7360
#[doc = ""]
7461
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream/TransformStream)"]
7562
#[doc = ""]
7663
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `TransformStream`*"]
77-
#[doc = ""]
78-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
8064
pub fn new_with_transformer_and_writable_strategy_and_readable_strategy(
8165
transformer: &::js_sys::Object,
8266
writable_strategy: &QueuingStrategy,

crates/web-sys/src/features/gen_WritableStream.rs

-12
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,29 @@ extern "C" {
1919
#[doc = ""]
2020
#[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
2121
pub fn locked(this: &WritableStream) -> bool;
22-
#[cfg(web_sys_unstable_apis)]
2322
#[wasm_bindgen(catch, constructor, js_class = "WritableStream")]
2423
#[doc = "The `new WritableStream(..)` constructor, creating a new instance of `WritableStream`."]
2524
#[doc = ""]
2625
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/WritableStream)"]
2726
#[doc = ""]
2827
#[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
29-
#[doc = ""]
30-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
31-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
3228
pub fn new() -> Result<WritableStream, JsValue>;
33-
#[cfg(web_sys_unstable_apis)]
3429
#[wasm_bindgen(catch, constructor, js_class = "WritableStream")]
3530
#[doc = "The `new WritableStream(..)` constructor, creating a new instance of `WritableStream`."]
3631
#[doc = ""]
3732
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/WritableStream)"]
3833
#[doc = ""]
3934
#[doc = "*This API requires the following crate features to be activated: `WritableStream`*"]
40-
#[doc = ""]
41-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
4335
pub fn new_with_underlying_sink(
4436
underlying_sink: &::js_sys::Object,
4537
) -> Result<WritableStream, JsValue>;
46-
#[cfg(web_sys_unstable_apis)]
4738
#[cfg(feature = "QueuingStrategy")]
4839
#[wasm_bindgen(catch, constructor, js_class = "WritableStream")]
4940
#[doc = "The `new WritableStream(..)` constructor, creating a new instance of `WritableStream`."]
5041
#[doc = ""]
5142
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream/WritableStream)"]
5243
#[doc = ""]
5344
#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`, `WritableStream`*"]
54-
#[doc = ""]
55-
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56-
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
5745
pub fn new_with_underlying_sink_and_strategy(
5846
underlying_sink: &::js_sys::Object,
5947
strategy: &QueuingStrategy,

crates/web-sys/webidls/unstable/QueuingStrategy.webidl

-15
This file was deleted.

0 commit comments

Comments
 (0)