web_sys/features/
gen_WebTransportSendStreamOptions.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 = "WebTransportSendStreamOptions"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `WebTransportSendStreamOptions` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"]
16 #[doc = ""]
17 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19 pub type WebTransportSendStreamOptions;
20 #[cfg(web_sys_unstable_apis)]
21 #[doc = "Get the `sendOrder` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"]
24 #[doc = ""]
25 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27 #[wasm_bindgen(method, getter = "sendOrder")]
28 pub fn get_send_order(this: &WebTransportSendStreamOptions) -> Option<f64>;
29 #[cfg(web_sys_unstable_apis)]
30 #[doc = "Change the `sendOrder` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"]
33 #[doc = ""]
34 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
36 #[wasm_bindgen(method, setter = "sendOrder")]
37 pub fn set_send_order(this: &WebTransportSendStreamOptions, val: Option<i32>);
38 #[cfg(web_sys_unstable_apis)]
39 #[doc = "Change the `sendOrder` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"]
42 #[doc = ""]
43 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 #[wasm_bindgen(method, setter = "sendOrder")]
46 pub fn set_send_order_opt_f64(this: &WebTransportSendStreamOptions, val: Option<f64>);
47}
48#[cfg(web_sys_unstable_apis)]
49impl WebTransportSendStreamOptions {
50 #[doc = "Construct a new `WebTransportSendStreamOptions`."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"]
53 #[doc = ""]
54 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56 pub fn new() -> Self {
57 #[allow(unused_mut)]
58 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
59 ret
60 }
61 #[cfg(web_sys_unstable_apis)]
62 #[deprecated = "Use `set_send_order()` instead."]
63 pub fn send_order(&mut self, val: Option<i32>) -> &mut Self {
64 self.set_send_order(val);
65 self
66 }
67}
68#[cfg(web_sys_unstable_apis)]
69impl Default for WebTransportSendStreamOptions {
70 fn default() -> Self {
71 Self::new()
72 }
73}