Skip to main content

web_sys/features/
gen_RtcPeerConnectionIceEventInit.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "RTCPeerConnectionIceEventInit"
10    )]
11    #[derive(Debug, Clone, PartialEq, Eq)]
12    #[doc = "The `RtcPeerConnectionIceEventInit` dictionary."]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
15    pub type RtcPeerConnectionIceEventInit;
16    #[doc = "Get the `bubbles` field of this object."]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
19    #[wasm_bindgen(method, getter = "bubbles")]
20    pub fn get_bubbles(this: &RtcPeerConnectionIceEventInit) -> Option<bool>;
21    #[doc = "Change the `bubbles` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
24    #[wasm_bindgen(method, setter = "bubbles")]
25    pub fn set_bubbles(this: &RtcPeerConnectionIceEventInit, val: bool);
26    #[doc = "Get the `cancelable` field of this object."]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
29    #[wasm_bindgen(method, getter = "cancelable")]
30    pub fn get_cancelable(this: &RtcPeerConnectionIceEventInit) -> Option<bool>;
31    #[doc = "Change the `cancelable` field of this object."]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
34    #[wasm_bindgen(method, setter = "cancelable")]
35    pub fn set_cancelable(this: &RtcPeerConnectionIceEventInit, val: bool);
36    #[doc = "Get the `composed` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
39    #[wasm_bindgen(method, getter = "composed")]
40    pub fn get_composed(this: &RtcPeerConnectionIceEventInit) -> Option<bool>;
41    #[doc = "Change the `composed` field of this object."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
44    #[wasm_bindgen(method, setter = "composed")]
45    pub fn set_composed(this: &RtcPeerConnectionIceEventInit, val: bool);
46    #[cfg(feature = "RtcIceCandidate")]
47    #[doc = "Get the `candidate` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"]
50    #[wasm_bindgen(method, getter = "candidate")]
51    pub fn get_candidate(this: &RtcPeerConnectionIceEventInit) -> Option<RtcIceCandidate>;
52    #[cfg(feature = "RtcIceCandidate")]
53    #[doc = "Change the `candidate` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"]
56    #[wasm_bindgen(method, setter = "candidate")]
57    pub fn set_candidate(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>);
58}
59impl RtcPeerConnectionIceEventInit {
60    #[doc = "Construct a new `RtcPeerConnectionIceEventInit`."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"]
63    pub fn new() -> Self {
64        #[allow(unused_mut)]
65        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
66        ret
67    }
68    #[deprecated = "Use `set_bubbles()` instead."]
69    pub fn bubbles(&mut self, val: bool) -> &mut Self {
70        self.set_bubbles(val);
71        self
72    }
73    #[deprecated = "Use `set_cancelable()` instead."]
74    pub fn cancelable(&mut self, val: bool) -> &mut Self {
75        self.set_cancelable(val);
76        self
77    }
78    #[deprecated = "Use `set_composed()` instead."]
79    pub fn composed(&mut self, val: bool) -> &mut Self {
80        self.set_composed(val);
81        self
82    }
83    #[cfg(feature = "RtcIceCandidate")]
84    #[deprecated = "Use `set_candidate()` instead."]
85    pub fn candidate(&mut self, val: Option<&RtcIceCandidate>) -> &mut Self {
86        self.set_candidate(val);
87        self
88    }
89}
90impl Default for RtcPeerConnectionIceEventInit {
91    fn default() -> Self {
92        Self::new()
93    }
94}