1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCIdentityAssertionResult)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `RtcIdentityAssertionResult` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] 11 pub type RtcIdentityAssertionResult; 12 } 13 impl RtcIdentityAssertionResult { 14 #[cfg(feature = "RtcIdentityProviderDetails")] 15 #[doc = "Construct a new `RtcIdentityAssertionResult`."] 16 #[doc = ""] 17 #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] new(assertion: &str, idp: &RtcIdentityProviderDetails) -> Self18 pub fn new(assertion: &str, idp: &RtcIdentityProviderDetails) -> Self { 19 #[allow(unused_mut)] 20 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 21 ret.assertion(assertion); 22 ret.idp(idp); 23 ret 24 } 25 #[doc = "Change the `assertion` field of this object."] 26 #[doc = ""] 27 #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] assertion(&mut self, val: &str) -> &mut Self28 pub fn assertion(&mut self, val: &str) -> &mut Self { 29 use wasm_bindgen::JsValue; 30 let r = ::js_sys::Reflect::set( 31 self.as_ref(), 32 &JsValue::from("assertion"), 33 &JsValue::from(val), 34 ); 35 debug_assert!( 36 r.is_ok(), 37 "setting properties should never fail on our dictionary objects" 38 ); 39 let _ = r; 40 self 41 } 42 #[cfg(feature = "RtcIdentityProviderDetails")] 43 #[doc = "Change the `idp` field of this object."] 44 #[doc = ""] 45 #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] idp(&mut self, val: &RtcIdentityProviderDetails) -> &mut Self46 pub fn idp(&mut self, val: &RtcIdentityProviderDetails) -> &mut Self { 47 use wasm_bindgen::JsValue; 48 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("idp"), &JsValue::from(val)); 49 debug_assert!( 50 r.is_ok(), 51 "setting properties should never fail on our dictionary objects" 52 ); 53 let _ = r; 54 self 55 } 56 } 57