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 = "Get the `username` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
58 #[wasm_bindgen(method, getter = "username")]
59 pub fn get_username(this: &RtcIceServer) -> Option<::alloc::string::String>;
60 #[doc = "Change the `username` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
63 #[wasm_bindgen(method, setter = "username")]
64 pub fn set_username(this: &RtcIceServer, val: &str);
65}
66impl RtcIceServer {
67 #[doc = "Construct a new `RtcIceServer`."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"]
70 pub fn new() -> Self {
71 #[allow(unused_mut)]
72 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
73 ret
74 }
75 #[deprecated = "Use `set_credential()` instead."]
76 pub fn credential(&mut self, val: &str) -> &mut Self {
77 self.set_credential(val);
78 self
79 }
80 #[cfg(feature = "RtcIceCredentialType")]
81 #[deprecated = "Use `set_credential_type()` instead."]
82 pub fn credential_type(&mut self, val: RtcIceCredentialType) -> &mut Self {
83 self.set_credential_type(val);
84 self
85 }
86 #[deprecated = "Use `set_url()` instead."]
87 pub fn url(&mut self, val: &str) -> &mut Self {
88 self.set_url(val);
89 self
90 }
91 #[deprecated = "Use `set_urls()` instead."]
92 pub fn urls(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
93 self.set_urls(val);
94 self
95 }
96 #[deprecated = "Use `set_username()` instead."]
97 pub fn username(&mut self, val: &str) -> &mut Self {
98 self.set_username(val);
99 self
100 }
101}
102impl Default for RtcIceServer {
103 fn default() -> Self {
104 Self::new()
105 }
106}