web_sys/features/
gen_RtcIceServer.rs1#![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 = RTCIceServer)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcIceServer` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
12 pub type RtcIceServer;
13 #[doc = "Get the `credential` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
16 #[wasm_bindgen(method, getter = "credential")]
17 pub fn get_credential(this: &RtcIceServer) -> Option<::alloc::string::String>;
18 #[doc = "Change the `credential` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
21 #[wasm_bindgen(method, setter = "credential")]
22 pub fn set_credential(this: &RtcIceServer, val: &str);
23 #[cfg(feature = "RtcIceCredentialType")]
24 #[doc = "Get the `credentialType` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"]
27 #[wasm_bindgen(method, getter = "credentialType")]
28 pub fn get_credential_type(this: &RtcIceServer) -> Option<RtcIceCredentialType>;
29 #[cfg(feature = "RtcIceCredentialType")]
30 #[doc = "Change the `credentialType` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"]
33 #[wasm_bindgen(method, setter = "credentialType")]
34 pub fn set_credential_type(this: &RtcIceServer, val: RtcIceCredentialType);
35 #[doc = "Get the `url` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
38 #[wasm_bindgen(method, getter = "url")]
39 pub fn get_url(this: &RtcIceServer) -> Option<::alloc::string::String>;
40 #[doc = "Change the `url` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
43 #[wasm_bindgen(method, setter = "url")]
44 pub fn set_url(this: &RtcIceServer, val: &str);
45 #[doc = "Get the `urls` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
48 #[wasm_bindgen(method, getter = "urls")]
49 pub fn get_urls(this: &RtcIceServer) -> ::wasm_bindgen::JsValue;
50 #[doc = "Change the `urls` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
53 #[wasm_bindgen(method, setter = "urls")]
54 pub fn set_urls(this: &RtcIceServer, val: &::wasm_bindgen::JsValue);
55 #[doc = "Change the `urls` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
58 #[wasm_bindgen(method, setter = "urls")]
59 pub fn set_urls_str(this: &RtcIceServer, val: &str);
60 #[doc = "Change the `urls` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
63 #[wasm_bindgen(method, setter = "urls")]
64 pub fn set_urls_str_sequence(this: &RtcIceServer, val: &::wasm_bindgen::JsValue);
65 #[doc = "Get the `username` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
68 #[wasm_bindgen(method, getter = "username")]
69 pub fn get_username(this: &RtcIceServer) -> Option<::alloc::string::String>;
70 #[doc = "Change the `username` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
73 #[wasm_bindgen(method, setter = "username")]
74 pub fn set_username(this: &RtcIceServer, val: &str);
75}
76impl RtcIceServer {
77 #[doc = "Construct a new `RtcIceServer`."]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
80 pub fn new() -> Self {
81 #[allow(unused_mut)]
82 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
83 ret
84 }
85 #[deprecated = "Use `set_credential()` instead."]
86 pub fn credential(&mut self, val: &str) -> &mut Self {
87 self.set_credential(val);
88 self
89 }
90 #[cfg(feature = "RtcIceCredentialType")]
91 #[deprecated = "Use `set_credential_type()` instead."]
92 pub fn credential_type(&mut self, val: RtcIceCredentialType) -> &mut Self {
93 self.set_credential_type(val);
94 self
95 }
96 #[deprecated = "Use `set_url()` instead."]
97 pub fn url(&mut self, val: &str) -> &mut Self {
98 self.set_url(val);
99 self
100 }
101 #[deprecated = "Use `set_urls()` instead."]
102 pub fn urls(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
103 self.set_urls(val);
104 self
105 }
106 #[deprecated = "Use `set_username()` instead."]
107 pub fn username(&mut self, val: &str) -> &mut Self {
108 self.set_username(val);
109 self
110 }
111}
112impl Default for RtcIceServer {
113 fn default() -> Self {
114 Self::new()
115 }
116}