web_sys/features/
gen_RtcrtpContributingSourceStats.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRTPContributingSourceStats)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `RtcrtpContributingSourceStats` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
12    pub type RtcrtpContributingSourceStats;
13    #[doc = "Get the `id` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
16    #[wasm_bindgen(method, getter = "id")]
17    pub fn get_id(this: &RtcrtpContributingSourceStats) -> Option<::alloc::string::String>;
18    #[doc = "Change the `id` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
21    #[wasm_bindgen(method, setter = "id")]
22    pub fn set_id(this: &RtcrtpContributingSourceStats, val: &str);
23    #[doc = "Get the `timestamp` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
26    #[wasm_bindgen(method, getter = "timestamp")]
27    pub fn get_timestamp(this: &RtcrtpContributingSourceStats) -> Option<f64>;
28    #[doc = "Change the `timestamp` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
31    #[wasm_bindgen(method, setter = "timestamp")]
32    pub fn set_timestamp(this: &RtcrtpContributingSourceStats, val: f64);
33    #[cfg(feature = "RtcStatsType")]
34    #[doc = "Get the `type` field of this object."]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"]
37    #[wasm_bindgen(method, getter = "type")]
38    pub fn get_type(this: &RtcrtpContributingSourceStats) -> Option<RtcStatsType>;
39    #[cfg(feature = "RtcStatsType")]
40    #[doc = "Change the `type` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"]
43    #[wasm_bindgen(method, setter = "type")]
44    pub fn set_type(this: &RtcrtpContributingSourceStats, val: RtcStatsType);
45    #[doc = "Get the `contributorSsrc` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
48    #[wasm_bindgen(method, getter = "contributorSsrc")]
49    pub fn get_contributor_ssrc(this: &RtcrtpContributingSourceStats) -> Option<u32>;
50    #[doc = "Change the `contributorSsrc` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
53    #[wasm_bindgen(method, setter = "contributorSsrc")]
54    pub fn set_contributor_ssrc(this: &RtcrtpContributingSourceStats, val: u32);
55    #[doc = "Get the `inboundRtpStreamId` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
58    #[wasm_bindgen(method, getter = "inboundRtpStreamId")]
59    pub fn get_inbound_rtp_stream_id(
60        this: &RtcrtpContributingSourceStats,
61    ) -> Option<::alloc::string::String>;
62    #[doc = "Change the `inboundRtpStreamId` field of this object."]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
65    #[wasm_bindgen(method, setter = "inboundRtpStreamId")]
66    pub fn set_inbound_rtp_stream_id(this: &RtcrtpContributingSourceStats, val: &str);
67}
68impl RtcrtpContributingSourceStats {
69    #[doc = "Construct a new `RtcrtpContributingSourceStats`."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"]
72    pub fn new() -> Self {
73        #[allow(unused_mut)]
74        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
75        ret
76    }
77    #[deprecated = "Use `set_id()` instead."]
78    pub fn id(&mut self, val: &str) -> &mut Self {
79        self.set_id(val);
80        self
81    }
82    #[deprecated = "Use `set_timestamp()` instead."]
83    pub fn timestamp(&mut self, val: f64) -> &mut Self {
84        self.set_timestamp(val);
85        self
86    }
87    #[cfg(feature = "RtcStatsType")]
88    #[deprecated = "Use `set_type()` instead."]
89    pub fn type_(&mut self, val: RtcStatsType) -> &mut Self {
90        self.set_type(val);
91        self
92    }
93    #[deprecated = "Use `set_contributor_ssrc()` instead."]
94    pub fn contributor_ssrc(&mut self, val: u32) -> &mut Self {
95        self.set_contributor_ssrc(val);
96        self
97    }
98    #[deprecated = "Use `set_inbound_rtp_stream_id()` instead."]
99    pub fn inbound_rtp_stream_id(&mut self, val: &str) -> &mut Self {
100        self.set_inbound_rtp_stream_id(val);
101        self
102    }
103}
104impl Default for RtcrtpContributingSourceStats {
105    fn default() -> Self {
106        Self::new()
107    }
108}