web_webtransport_sys/gen/
gen_WebTransportSendStreamStats.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WebTransportSendStreamStats)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `WebTransportSendStreamStats` dictionary."]
9 pub type WebTransportSendStreamStats;
10}
11impl WebTransportSendStreamStats {
12 #[doc = "Construct a new `WebTransportSendStreamStats`."]
13 pub fn new() -> Self {
14 #[allow(unused_mut)]
15 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
16 ret
17 }
18 #[doc = "Change the `bytesAcknowledged` field of this object."]
19 pub fn bytes_acknowledged(&mut self, val: f64) -> &mut Self {
20 use wasm_bindgen::JsValue;
21 let r = ::js_sys::Reflect::set(
22 self.as_ref(),
23 &JsValue::from("bytesAcknowledged"),
24 &JsValue::from(val),
25 );
26 debug_assert!(
27 r.is_ok(),
28 "setting properties should never fail on our dictionary objects"
29 );
30 let _ = r;
31 self
32 }
33 #[doc = "Change the `bytesSent` field of this object."]
34 pub fn bytes_sent(&mut self, val: f64) -> &mut Self {
35 use wasm_bindgen::JsValue;
36 let r = ::js_sys::Reflect::set(
37 self.as_ref(),
38 &JsValue::from("bytesSent"),
39 &JsValue::from(val),
40 );
41 debug_assert!(
42 r.is_ok(),
43 "setting properties should never fail on our dictionary objects"
44 );
45 let _ = r;
46 self
47 }
48 #[doc = "Change the `bytesWritten` field of this object."]
49 pub fn bytes_written(&mut self, val: f64) -> &mut Self {
50 use wasm_bindgen::JsValue;
51 let r = ::js_sys::Reflect::set(
52 self.as_ref(),
53 &JsValue::from("bytesWritten"),
54 &JsValue::from(val),
55 );
56 debug_assert!(
57 r.is_ok(),
58 "setting properties should never fail on our dictionary objects"
59 );
60 let _ = r;
61 self
62 }
63}
64impl Default for WebTransportSendStreamStats {
65 fn default() -> Self {
66 Self::new()
67 }
68}