web_sys/features/
gen_RtcIdentityProviderOptions.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 = RTCIdentityProviderOptions)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `RtcIdentityProviderOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
12    pub type RtcIdentityProviderOptions;
13    #[doc = "Get the `peerIdentity` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
16    #[wasm_bindgen(method, getter = "peerIdentity")]
17    pub fn get_peer_identity(this: &RtcIdentityProviderOptions) -> Option<::alloc::string::String>;
18    #[doc = "Change the `peerIdentity` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
21    #[wasm_bindgen(method, setter = "peerIdentity")]
22    pub fn set_peer_identity(this: &RtcIdentityProviderOptions, val: &str);
23    #[doc = "Get the `protocol` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
26    #[wasm_bindgen(method, getter = "protocol")]
27    pub fn get_protocol(this: &RtcIdentityProviderOptions) -> Option<::alloc::string::String>;
28    #[doc = "Change the `protocol` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
31    #[wasm_bindgen(method, setter = "protocol")]
32    pub fn set_protocol(this: &RtcIdentityProviderOptions, val: &str);
33    #[doc = "Get the `usernameHint` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
36    #[wasm_bindgen(method, getter = "usernameHint")]
37    pub fn get_username_hint(this: &RtcIdentityProviderOptions) -> Option<::alloc::string::String>;
38    #[doc = "Change the `usernameHint` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
41    #[wasm_bindgen(method, setter = "usernameHint")]
42    pub fn set_username_hint(this: &RtcIdentityProviderOptions, val: &str);
43}
44impl RtcIdentityProviderOptions {
45    #[doc = "Construct a new `RtcIdentityProviderOptions`."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"]
48    pub fn new() -> Self {
49        #[allow(unused_mut)]
50        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
51        ret
52    }
53    #[deprecated = "Use `set_peer_identity()` instead."]
54    pub fn peer_identity(&mut self, val: &str) -> &mut Self {
55        self.set_peer_identity(val);
56        self
57    }
58    #[deprecated = "Use `set_protocol()` instead."]
59    pub fn protocol(&mut self, val: &str) -> &mut Self {
60        self.set_protocol(val);
61        self
62    }
63    #[deprecated = "Use `set_username_hint()` instead."]
64    pub fn username_hint(&mut self, val: &str) -> &mut Self {
65        self.set_username_hint(val);
66        self
67    }
68}
69impl Default for RtcIdentityProviderOptions {
70    fn default() -> Self {
71        Self::new()
72    }
73}