web_sys/features/
gen_U2fClientData.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 = U2FClientData)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `U2fClientData` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
12 pub type U2fClientData;
13 #[doc = "Get the `challenge` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
16 #[wasm_bindgen(method, getter = "challenge")]
17 pub fn get_challenge(this: &U2fClientData) -> Option<::alloc::string::String>;
18 #[doc = "Change the `challenge` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
21 #[wasm_bindgen(method, setter = "challenge")]
22 pub fn set_challenge(this: &U2fClientData, val: &str);
23 #[doc = "Get the `origin` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
26 #[wasm_bindgen(method, getter = "origin")]
27 pub fn get_origin(this: &U2fClientData) -> Option<::alloc::string::String>;
28 #[doc = "Change the `origin` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
31 #[wasm_bindgen(method, setter = "origin")]
32 pub fn set_origin(this: &U2fClientData, val: &str);
33 #[doc = "Get the `typ` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
36 #[wasm_bindgen(method, getter = "typ")]
37 pub fn get_typ(this: &U2fClientData) -> Option<::alloc::string::String>;
38 #[doc = "Change the `typ` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
41 #[wasm_bindgen(method, setter = "typ")]
42 pub fn set_typ(this: &U2fClientData, val: &str);
43}
44impl U2fClientData {
45 #[doc = "Construct a new `U2fClientData`."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"]
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_challenge()` instead."]
54 pub fn challenge(&mut self, val: &str) -> &mut Self {
55 self.set_challenge(val);
56 self
57 }
58 #[deprecated = "Use `set_origin()` instead."]
59 pub fn origin(&mut self, val: &str) -> &mut Self {
60 self.set_origin(val);
61 self
62 }
63 #[deprecated = "Use `set_typ()` instead."]
64 pub fn typ(&mut self, val: &str) -> &mut Self {
65 self.set_typ(val);
66 self
67 }
68}
69impl Default for U2fClientData {
70 fn default() -> Self {
71 Self::new()
72 }
73}