Skip to main content

web_sys/features/
gen_WebTransportSendStreamOptions.rs

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