web_sys/features/
gen_RtcIceCandidatePairStats.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 = RTCIceCandidatePairStats)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `RtcIceCandidatePairStats` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
12    pub type RtcIceCandidatePairStats;
13    #[doc = "Get the `id` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
16    #[wasm_bindgen(method, getter = "id")]
17    pub fn get_id(this: &RtcIceCandidatePairStats) -> 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: `RtcIceCandidatePairStats`*"]
21    #[wasm_bindgen(method, setter = "id")]
22    pub fn set_id(this: &RtcIceCandidatePairStats, 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: `RtcIceCandidatePairStats`*"]
26    #[wasm_bindgen(method, getter = "timestamp")]
27    pub fn get_timestamp(this: &RtcIceCandidatePairStats) -> 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: `RtcIceCandidatePairStats`*"]
31    #[wasm_bindgen(method, setter = "timestamp")]
32    pub fn set_timestamp(this: &RtcIceCandidatePairStats, 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: `RtcIceCandidatePairStats`, `RtcStatsType`*"]
37    #[wasm_bindgen(method, getter = "type")]
38    pub fn get_type(this: &RtcIceCandidatePairStats) -> 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: `RtcIceCandidatePairStats`, `RtcStatsType`*"]
43    #[wasm_bindgen(method, setter = "type")]
44    pub fn set_type(this: &RtcIceCandidatePairStats, val: RtcStatsType);
45    #[doc = "Get the `bytesReceived` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
48    #[wasm_bindgen(method, getter = "bytesReceived")]
49    pub fn get_bytes_received(this: &RtcIceCandidatePairStats) -> Option<f64>;
50    #[doc = "Change the `bytesReceived` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
53    #[wasm_bindgen(method, setter = "bytesReceived")]
54    pub fn set_bytes_received(this: &RtcIceCandidatePairStats, val: f64);
55    #[doc = "Get the `bytesSent` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
58    #[wasm_bindgen(method, getter = "bytesSent")]
59    pub fn get_bytes_sent(this: &RtcIceCandidatePairStats) -> Option<f64>;
60    #[doc = "Change the `bytesSent` field of this object."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
63    #[wasm_bindgen(method, setter = "bytesSent")]
64    pub fn set_bytes_sent(this: &RtcIceCandidatePairStats, val: f64);
65    #[doc = "Get the `componentId` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
68    #[wasm_bindgen(method, getter = "componentId")]
69    pub fn get_component_id(this: &RtcIceCandidatePairStats) -> Option<u32>;
70    #[doc = "Change the `componentId` field of this object."]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
73    #[wasm_bindgen(method, setter = "componentId")]
74    pub fn set_component_id(this: &RtcIceCandidatePairStats, val: u32);
75    #[doc = "Get the `lastPacketReceivedTimestamp` field of this object."]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
78    #[wasm_bindgen(method, getter = "lastPacketReceivedTimestamp")]
79    pub fn get_last_packet_received_timestamp(this: &RtcIceCandidatePairStats) -> Option<f64>;
80    #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
83    #[wasm_bindgen(method, setter = "lastPacketReceivedTimestamp")]
84    pub fn set_last_packet_received_timestamp(this: &RtcIceCandidatePairStats, val: f64);
85    #[doc = "Get the `lastPacketSentTimestamp` field of this object."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
88    #[wasm_bindgen(method, getter = "lastPacketSentTimestamp")]
89    pub fn get_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats) -> Option<f64>;
90    #[doc = "Change the `lastPacketSentTimestamp` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
93    #[wasm_bindgen(method, setter = "lastPacketSentTimestamp")]
94    pub fn set_last_packet_sent_timestamp(this: &RtcIceCandidatePairStats, val: f64);
95    #[doc = "Get the `localCandidateId` field of this object."]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
98    #[wasm_bindgen(method, getter = "localCandidateId")]
99    pub fn get_local_candidate_id(
100        this: &RtcIceCandidatePairStats,
101    ) -> Option<::alloc::string::String>;
102    #[doc = "Change the `localCandidateId` field of this object."]
103    #[doc = ""]
104    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
105    #[wasm_bindgen(method, setter = "localCandidateId")]
106    pub fn set_local_candidate_id(this: &RtcIceCandidatePairStats, val: &str);
107    #[doc = "Get the `nominated` field of this object."]
108    #[doc = ""]
109    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
110    #[wasm_bindgen(method, getter = "nominated")]
111    pub fn get_nominated(this: &RtcIceCandidatePairStats) -> Option<bool>;
112    #[doc = "Change the `nominated` field of this object."]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
115    #[wasm_bindgen(method, setter = "nominated")]
116    pub fn set_nominated(this: &RtcIceCandidatePairStats, val: bool);
117    #[doc = "Get the `priority` field of this object."]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
120    #[wasm_bindgen(method, getter = "priority")]
121    pub fn get_priority(this: &RtcIceCandidatePairStats) -> Option<f64>;
122    #[doc = "Change the `priority` field of this object."]
123    #[doc = ""]
124    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
125    #[wasm_bindgen(method, setter = "priority")]
126    pub fn set_priority(this: &RtcIceCandidatePairStats, val: f64);
127    #[doc = "Get the `readable` field of this object."]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
130    #[wasm_bindgen(method, getter = "readable")]
131    pub fn get_readable(this: &RtcIceCandidatePairStats) -> Option<bool>;
132    #[doc = "Change the `readable` field of this object."]
133    #[doc = ""]
134    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
135    #[wasm_bindgen(method, setter = "readable")]
136    pub fn set_readable(this: &RtcIceCandidatePairStats, val: bool);
137    #[doc = "Get the `remoteCandidateId` field of this object."]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
140    #[wasm_bindgen(method, getter = "remoteCandidateId")]
141    pub fn get_remote_candidate_id(
142        this: &RtcIceCandidatePairStats,
143    ) -> Option<::alloc::string::String>;
144    #[doc = "Change the `remoteCandidateId` field of this object."]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
147    #[wasm_bindgen(method, setter = "remoteCandidateId")]
148    pub fn set_remote_candidate_id(this: &RtcIceCandidatePairStats, val: &str);
149    #[doc = "Get the `selected` field of this object."]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
152    #[wasm_bindgen(method, getter = "selected")]
153    pub fn get_selected(this: &RtcIceCandidatePairStats) -> Option<bool>;
154    #[doc = "Change the `selected` field of this object."]
155    #[doc = ""]
156    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
157    #[wasm_bindgen(method, setter = "selected")]
158    pub fn set_selected(this: &RtcIceCandidatePairStats, val: bool);
159    #[cfg(feature = "RtcStatsIceCandidatePairState")]
160    #[doc = "Get the `state` field of this object."]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"]
163    #[wasm_bindgen(method, getter = "state")]
164    pub fn get_state(this: &RtcIceCandidatePairStats) -> Option<RtcStatsIceCandidatePairState>;
165    #[cfg(feature = "RtcStatsIceCandidatePairState")]
166    #[doc = "Change the `state` field of this object."]
167    #[doc = ""]
168    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"]
169    #[wasm_bindgen(method, setter = "state")]
170    pub fn set_state(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState);
171    #[doc = "Get the `transportId` field of this object."]
172    #[doc = ""]
173    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
174    #[wasm_bindgen(method, getter = "transportId")]
175    pub fn get_transport_id(this: &RtcIceCandidatePairStats) -> Option<::alloc::string::String>;
176    #[doc = "Change the `transportId` field of this object."]
177    #[doc = ""]
178    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
179    #[wasm_bindgen(method, setter = "transportId")]
180    pub fn set_transport_id(this: &RtcIceCandidatePairStats, val: &str);
181    #[doc = "Get the `writable` field of this object."]
182    #[doc = ""]
183    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
184    #[wasm_bindgen(method, getter = "writable")]
185    pub fn get_writable(this: &RtcIceCandidatePairStats) -> Option<bool>;
186    #[doc = "Change the `writable` field of this object."]
187    #[doc = ""]
188    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
189    #[wasm_bindgen(method, setter = "writable")]
190    pub fn set_writable(this: &RtcIceCandidatePairStats, val: bool);
191}
192impl RtcIceCandidatePairStats {
193    #[doc = "Construct a new `RtcIceCandidatePairStats`."]
194    #[doc = ""]
195    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"]
196    pub fn new() -> Self {
197        #[allow(unused_mut)]
198        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
199        ret
200    }
201    #[deprecated = "Use `set_id()` instead."]
202    pub fn id(&mut self, val: &str) -> &mut Self {
203        self.set_id(val);
204        self
205    }
206    #[deprecated = "Use `set_timestamp()` instead."]
207    pub fn timestamp(&mut self, val: f64) -> &mut Self {
208        self.set_timestamp(val);
209        self
210    }
211    #[cfg(feature = "RtcStatsType")]
212    #[deprecated = "Use `set_type()` instead."]
213    pub fn type_(&mut self, val: RtcStatsType) -> &mut Self {
214        self.set_type(val);
215        self
216    }
217    #[deprecated = "Use `set_bytes_received()` instead."]
218    pub fn bytes_received(&mut self, val: f64) -> &mut Self {
219        self.set_bytes_received(val);
220        self
221    }
222    #[deprecated = "Use `set_bytes_sent()` instead."]
223    pub fn bytes_sent(&mut self, val: f64) -> &mut Self {
224        self.set_bytes_sent(val);
225        self
226    }
227    #[deprecated = "Use `set_component_id()` instead."]
228    pub fn component_id(&mut self, val: u32) -> &mut Self {
229        self.set_component_id(val);
230        self
231    }
232    #[deprecated = "Use `set_last_packet_received_timestamp()` instead."]
233    pub fn last_packet_received_timestamp(&mut self, val: f64) -> &mut Self {
234        self.set_last_packet_received_timestamp(val);
235        self
236    }
237    #[deprecated = "Use `set_last_packet_sent_timestamp()` instead."]
238    pub fn last_packet_sent_timestamp(&mut self, val: f64) -> &mut Self {
239        self.set_last_packet_sent_timestamp(val);
240        self
241    }
242    #[deprecated = "Use `set_local_candidate_id()` instead."]
243    pub fn local_candidate_id(&mut self, val: &str) -> &mut Self {
244        self.set_local_candidate_id(val);
245        self
246    }
247    #[deprecated = "Use `set_nominated()` instead."]
248    pub fn nominated(&mut self, val: bool) -> &mut Self {
249        self.set_nominated(val);
250        self
251    }
252    #[deprecated = "Use `set_priority()` instead."]
253    pub fn priority(&mut self, val: f64) -> &mut Self {
254        self.set_priority(val);
255        self
256    }
257    #[deprecated = "Use `set_readable()` instead."]
258    pub fn readable(&mut self, val: bool) -> &mut Self {
259        self.set_readable(val);
260        self
261    }
262    #[deprecated = "Use `set_remote_candidate_id()` instead."]
263    pub fn remote_candidate_id(&mut self, val: &str) -> &mut Self {
264        self.set_remote_candidate_id(val);
265        self
266    }
267    #[deprecated = "Use `set_selected()` instead."]
268    pub fn selected(&mut self, val: bool) -> &mut Self {
269        self.set_selected(val);
270        self
271    }
272    #[cfg(feature = "RtcStatsIceCandidatePairState")]
273    #[deprecated = "Use `set_state()` instead."]
274    pub fn state(&mut self, val: RtcStatsIceCandidatePairState) -> &mut Self {
275        self.set_state(val);
276        self
277    }
278    #[deprecated = "Use `set_transport_id()` instead."]
279    pub fn transport_id(&mut self, val: &str) -> &mut Self {
280        self.set_transport_id(val);
281        self
282    }
283    #[deprecated = "Use `set_writable()` instead."]
284    pub fn writable(&mut self, val: bool) -> &mut Self {
285        self.set_writable(val);
286        self
287    }
288}
289impl Default for RtcIceCandidatePairStats {
290    fn default() -> Self {
291        Self::new()
292    }
293}