web_sys/features/
gen_WebTransportReceiveStreamStats.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 = "WebTransportReceiveStreamStats"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `WebTransportReceiveStreamStats` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
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 WebTransportReceiveStreamStats;
20 #[cfg(web_sys_unstable_apis)]
21 #[doc = "Get the `bytesRead` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
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 = "bytesRead")]
28 pub fn get_bytes_read(this: &WebTransportReceiveStreamStats) -> Option<f64>;
29 #[cfg(web_sys_unstable_apis)]
30 #[doc = "Change the `bytesRead` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
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 = "bytesRead")]
37 pub fn set_bytes_read(this: &WebTransportReceiveStreamStats, val: u32);
38 #[cfg(web_sys_unstable_apis)]
39 #[doc = "Change the `bytesRead` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
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 = "bytesRead")]
46 pub fn set_bytes_read_f64(this: &WebTransportReceiveStreamStats, val: f64);
47 #[cfg(web_sys_unstable_apis)]
48 #[doc = "Get the `bytesReceived` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
51 #[doc = ""]
52 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54 #[wasm_bindgen(method, getter = "bytesReceived")]
55 pub fn get_bytes_received(this: &WebTransportReceiveStreamStats) -> Option<f64>;
56 #[cfg(web_sys_unstable_apis)]
57 #[doc = "Change the `bytesReceived` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 #[wasm_bindgen(method, setter = "bytesReceived")]
64 pub fn set_bytes_received(this: &WebTransportReceiveStreamStats, val: u32);
65 #[cfg(web_sys_unstable_apis)]
66 #[doc = "Change the `bytesReceived` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 #[wasm_bindgen(method, setter = "bytesReceived")]
73 pub fn set_bytes_received_f64(this: &WebTransportReceiveStreamStats, val: f64);
74 #[cfg(web_sys_unstable_apis)]
75 #[doc = "Get the `timestamp` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
78 #[doc = ""]
79 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
81 #[wasm_bindgen(method, getter = "timestamp")]
82 pub fn get_timestamp(this: &WebTransportReceiveStreamStats) -> Option<f64>;
83 #[cfg(web_sys_unstable_apis)]
84 #[doc = "Change the `timestamp` field of this object."]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
87 #[doc = ""]
88 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
89 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
90 #[wasm_bindgen(method, setter = "timestamp")]
91 pub fn set_timestamp(this: &WebTransportReceiveStreamStats, val: f64);
92}
93#[cfg(web_sys_unstable_apis)]
94impl WebTransportReceiveStreamStats {
95 #[doc = "Construct a new `WebTransportReceiveStreamStats`."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 pub fn new() -> Self {
102 #[allow(unused_mut)]
103 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
104 ret
105 }
106 #[cfg(web_sys_unstable_apis)]
107 #[deprecated = "Use `set_bytes_read()` instead."]
108 pub fn bytes_read(&mut self, val: u32) -> &mut Self {
109 self.set_bytes_read(val);
110 self
111 }
112 #[cfg(web_sys_unstable_apis)]
113 #[deprecated = "Use `set_bytes_received()` instead."]
114 pub fn bytes_received(&mut self, val: u32) -> &mut Self {
115 self.set_bytes_received(val);
116 self
117 }
118 #[cfg(web_sys_unstable_apis)]
119 #[deprecated = "Use `set_timestamp()` instead."]
120 pub fn timestamp(&mut self, val: f64) -> &mut Self {
121 self.set_timestamp(val);
122 self
123 }
124}
125#[cfg(web_sys_unstable_apis)]
126impl Default for WebTransportReceiveStreamStats {
127 fn default() -> Self {
128 Self::new()
129 }
130}