Skip to content

Commit

Permalink
update bindings & features
Browse files Browse the repository at this point in the history
  • Loading branch information
mriise committed Apr 24, 2023
1 parent 2ff6044 commit 3f51031
Show file tree
Hide file tree
Showing 11 changed files with 526 additions and 172 deletions.
3 changes: 2 additions & 1 deletion crates/web-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1471,12 +1471,13 @@ WebTransportCongestionControl = []
WebTransportDatagramDuplexStream = []
WebTransportDatagramStats = []
WebTransportError = ["DomException"]
WebTransportErrorInit = []
WebTransportErrorOptions = []
WebTransportErrorSource = []
WebTransportHash = []
WebTransportOptions = []
WebTransportReceiveStream = ["ReadableStream"]
WebTransportReceiveStreamStats = []
WebTransportReliabilityMode = []
WebTransportSendStream = ["WritableStream"]
WebTransportSendStreamOptions = []
WebTransportSendStreamStats = []
Expand Down
228 changes: 228 additions & 0 deletions crates/web-sys/src/features/gen_WebTransport.rs

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions crates/web-sys/src/features/gen_WebTransportBidirectionalStream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,28 @@ extern "C" {
#[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(this: &WebTransportBidirectionalStream) -> WebTransportSendStream;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "WebTransportReceiveStream")]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportBidirectionalStream" , js_name = readable)]
#[doc = "Getter for the `readable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportBidirectionalStream/readable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportBidirectionalStream`, `WebTransportReceiveStream`*"]
#[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 readable(this: &WebTransportBidirectionalStream) -> WebTransportReceiveStream;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "WebTransportSendStream")]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportBidirectionalStream" , js_name = writable)]
#[doc = "Getter for the `writable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportBidirectionalStream/writable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportBidirectionalStream`, `WebTransportSendStream`*"]
#[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(this: &WebTransportBidirectionalStream) -> WebTransportSendStream;
}
139 changes: 131 additions & 8 deletions crates/web-sys/src/features/gen_WebTransportDatagramDuplexStream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern "C" {
#[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 incoming_max_age(this: &WebTransportDatagramDuplexStream) -> Option<f64>;
pub fn incoming_max_age(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingMaxAge)]
#[doc = "Setter for the `incomingMaxAge` field of this object."]
Expand All @@ -71,7 +71,7 @@ extern "C" {
#[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 set_incoming_max_age(this: &WebTransportDatagramDuplexStream, value: Option<f64>);
pub fn set_incoming_max_age(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingMaxAge)]
#[doc = "Getter for the `outgoingMaxAge` field of this object."]
Expand All @@ -82,7 +82,7 @@ extern "C" {
#[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 outgoing_max_age(this: &WebTransportDatagramDuplexStream) -> Option<f64>;
pub fn outgoing_max_age(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingMaxAge)]
#[doc = "Setter for the `outgoingMaxAge` field of this object."]
Expand All @@ -93,7 +93,7 @@ extern "C" {
#[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 set_outgoing_max_age(this: &WebTransportDatagramDuplexStream, value: Option<f64>);
pub fn set_outgoing_max_age(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingHighWaterMark)]
#[doc = "Getter for the `incomingHighWaterMark` field of this object."]
Expand All @@ -104,7 +104,7 @@ extern "C" {
#[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 incoming_high_water_mark(this: &WebTransportDatagramDuplexStream) -> i32;
pub fn incoming_high_water_mark(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingHighWaterMark)]
#[doc = "Setter for the `incomingHighWaterMark` field of this object."]
Expand All @@ -115,7 +115,7 @@ extern "C" {
#[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 set_incoming_high_water_mark(this: &WebTransportDatagramDuplexStream, value: i32);
pub fn set_incoming_high_water_mark(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingHighWaterMark)]
#[doc = "Getter for the `outgoingHighWaterMark` field of this object."]
Expand All @@ -126,7 +126,7 @@ extern "C" {
#[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 outgoing_high_water_mark(this: &WebTransportDatagramDuplexStream) -> i32;
pub fn outgoing_high_water_mark(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingHighWaterMark)]
#[doc = "Setter for the `outgoingHighWaterMark` field of this object."]
Expand All @@ -137,5 +137,128 @@ extern "C" {
#[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 set_outgoing_high_water_mark(this: &WebTransportDatagramDuplexStream, value: i32);
pub fn set_outgoing_high_water_mark(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "ReadableStream")]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = readable)]
#[doc = "Getter for the `readable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/readable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `WebTransportDatagramDuplexStream`*"]
#[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 readable(this: &WebTransportDatagramDuplexStream) -> ReadableStream;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "WritableStream")]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = writable)]
#[doc = "Getter for the `writable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/writable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`, `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(this: &WebTransportDatagramDuplexStream) -> WritableStream;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = maxDatagramSize)]
#[doc = "Getter for the `maxDatagramSize` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 max_datagram_size(this: &WebTransportDatagramDuplexStream) -> u32;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingMaxAge)]
#[doc = "Getter for the `incomingMaxAge` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 incoming_max_age(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingMaxAge)]
#[doc = "Setter for the `incomingMaxAge` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 set_incoming_max_age(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingMaxAge)]
#[doc = "Getter for the `outgoingMaxAge` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 outgoing_max_age(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingMaxAge)]
#[doc = "Setter for the `outgoingMaxAge` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 set_outgoing_max_age(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingHighWaterMark)]
#[doc = "Getter for the `incomingHighWaterMark` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 incoming_high_water_mark(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = incomingHighWaterMark)]
#[doc = "Setter for the `incomingHighWaterMark` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 set_incoming_high_water_mark(this: &WebTransportDatagramDuplexStream, value: f64);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingHighWaterMark)]
#[doc = "Getter for the `outgoingHighWaterMark` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 outgoing_high_water_mark(this: &WebTransportDatagramDuplexStream) -> f64;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "WebTransportDatagramDuplexStream" , js_name = outgoingHighWaterMark)]
#[doc = "Setter for the `outgoingHighWaterMark` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramDuplexStream`*"]
#[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 set_outgoing_high_water_mark(this: &WebTransportDatagramDuplexStream, value: f64);
}
Loading

0 comments on commit 3f51031

Please sign in to comment.