web_sys/features/
gen_WebTransportSendStreamStats.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 (extends = :: js_sys :: Object , js_name = WebTransportSendStreamStats)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `WebTransportSendStreamStats` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
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 WebTransportSendStreamStats;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `bytesAcknowledged` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
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 = "bytesAcknowledged")]
25 pub fn get_bytes_acknowledged(this: &WebTransportSendStreamStats) -> Option<f64>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `bytesAcknowledged` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
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 = "bytesAcknowledged")]
34 pub fn set_bytes_acknowledged(this: &WebTransportSendStreamStats, val: u32);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Change the `bytesAcknowledged` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
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 = "bytesAcknowledged")]
43 pub fn set_bytes_acknowledged_f64(this: &WebTransportSendStreamStats, val: f64);
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Get the `bytesSent` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, getter = "bytesSent")]
52 pub fn get_bytes_sent(this: &WebTransportSendStreamStats) -> Option<f64>;
53 #[cfg(web_sys_unstable_apis)]
54 #[doc = "Change the `bytesSent` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
57 #[doc = ""]
58 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
60 #[wasm_bindgen(method, setter = "bytesSent")]
61 pub fn set_bytes_sent(this: &WebTransportSendStreamStats, val: u32);
62 #[cfg(web_sys_unstable_apis)]
63 #[doc = "Change the `bytesSent` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
66 #[doc = ""]
67 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 #[wasm_bindgen(method, setter = "bytesSent")]
70 pub fn set_bytes_sent_f64(this: &WebTransportSendStreamStats, val: f64);
71 #[cfg(web_sys_unstable_apis)]
72 #[doc = "Get the `bytesWritten` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
75 #[doc = ""]
76 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 #[wasm_bindgen(method, getter = "bytesWritten")]
79 pub fn get_bytes_written(this: &WebTransportSendStreamStats) -> Option<f64>;
80 #[cfg(web_sys_unstable_apis)]
81 #[doc = "Change the `bytesWritten` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
84 #[doc = ""]
85 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 #[wasm_bindgen(method, setter = "bytesWritten")]
88 pub fn set_bytes_written(this: &WebTransportSendStreamStats, val: u32);
89 #[cfg(web_sys_unstable_apis)]
90 #[doc = "Change the `bytesWritten` field of this object."]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
93 #[doc = ""]
94 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
96 #[wasm_bindgen(method, setter = "bytesWritten")]
97 pub fn set_bytes_written_f64(this: &WebTransportSendStreamStats, val: f64);
98 #[cfg(web_sys_unstable_apis)]
99 #[doc = "Get the `timestamp` field of this object."]
100 #[doc = ""]
101 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
102 #[doc = ""]
103 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
104 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
105 #[wasm_bindgen(method, getter = "timestamp")]
106 pub fn get_timestamp(this: &WebTransportSendStreamStats) -> Option<f64>;
107 #[cfg(web_sys_unstable_apis)]
108 #[doc = "Change the `timestamp` field of this object."]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
111 #[doc = ""]
112 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
114 #[wasm_bindgen(method, setter = "timestamp")]
115 pub fn set_timestamp(this: &WebTransportSendStreamStats, val: f64);
116}
117#[cfg(web_sys_unstable_apis)]
118impl WebTransportSendStreamStats {
119 #[doc = "Construct a new `WebTransportSendStreamStats`."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"]
122 #[doc = ""]
123 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
125 pub fn new() -> Self {
126 #[allow(unused_mut)]
127 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
128 ret
129 }
130 #[cfg(web_sys_unstable_apis)]
131 #[deprecated = "Use `set_bytes_acknowledged()` instead."]
132 pub fn bytes_acknowledged(&mut self, val: u32) -> &mut Self {
133 self.set_bytes_acknowledged(val);
134 self
135 }
136 #[cfg(web_sys_unstable_apis)]
137 #[deprecated = "Use `set_bytes_sent()` instead."]
138 pub fn bytes_sent(&mut self, val: u32) -> &mut Self {
139 self.set_bytes_sent(val);
140 self
141 }
142 #[cfg(web_sys_unstable_apis)]
143 #[deprecated = "Use `set_bytes_written()` instead."]
144 pub fn bytes_written(&mut self, val: u32) -> &mut Self {
145 self.set_bytes_written(val);
146 self
147 }
148 #[cfg(web_sys_unstable_apis)]
149 #[deprecated = "Use `set_timestamp()` instead."]
150 pub fn timestamp(&mut self, val: f64) -> &mut Self {
151 self.set_timestamp(val);
152 self
153 }
154}
155#[cfg(web_sys_unstable_apis)]
156impl Default for WebTransportSendStreamStats {
157 fn default() -> Self {
158 Self::new()
159 }
160}