Skip to main content

web_sys/features/
gen_PublicKeyCredentialUserEntityJson.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "PublicKeyCredentialUserEntityJSON"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `PublicKeyCredentialUserEntityJson` dictionary."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
16    #[doc = ""]
17    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19    pub type PublicKeyCredentialUserEntityJson;
20    #[cfg(web_sys_unstable_apis)]
21    #[doc = "Get the `displayName` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
24    #[doc = ""]
25    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27    #[wasm_bindgen(method, getter = "displayName")]
28    pub fn get_display_name(this: &PublicKeyCredentialUserEntityJson) -> ::alloc::string::String;
29    #[cfg(web_sys_unstable_apis)]
30    #[doc = "Change the `displayName` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
33    #[doc = ""]
34    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
36    #[wasm_bindgen(method, setter = "displayName")]
37    pub fn set_display_name(this: &PublicKeyCredentialUserEntityJson, val: &str);
38    #[cfg(web_sys_unstable_apis)]
39    #[doc = "Get the `id` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    #[wasm_bindgen(method, getter = "id")]
46    pub fn get_id(this: &PublicKeyCredentialUserEntityJson) -> ::alloc::string::String;
47    #[cfg(web_sys_unstable_apis)]
48    #[doc = "Change the `id` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
51    #[doc = ""]
52    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54    #[wasm_bindgen(method, setter = "id")]
55    pub fn set_id(this: &PublicKeyCredentialUserEntityJson, val: &str);
56    #[cfg(web_sys_unstable_apis)]
57    #[doc = "Get the `name` field of this object."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    #[wasm_bindgen(method, getter = "name")]
64    pub fn get_name(this: &PublicKeyCredentialUserEntityJson) -> ::alloc::string::String;
65    #[cfg(web_sys_unstable_apis)]
66    #[doc = "Change the `name` field of this object."]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
69    #[doc = ""]
70    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72    #[wasm_bindgen(method, setter = "name")]
73    pub fn set_name(this: &PublicKeyCredentialUserEntityJson, val: &str);
74}
75#[cfg(web_sys_unstable_apis)]
76impl PublicKeyCredentialUserEntityJson {
77    #[doc = "Construct a new `PublicKeyCredentialUserEntityJson`."]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntityJson`*"]
80    #[doc = ""]
81    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
82    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
83    pub fn new(display_name: &str, id: &str, name: &str) -> Self {
84        #[allow(unused_mut)]
85        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
86        ret.set_display_name(display_name);
87        ret.set_id(id);
88        ret.set_name(name);
89        ret
90    }
91    #[cfg(web_sys_unstable_apis)]
92    #[deprecated = "Use `set_display_name()` instead."]
93    pub fn display_name(&mut self, val: &str) -> &mut Self {
94        self.set_display_name(val);
95        self
96    }
97    #[cfg(web_sys_unstable_apis)]
98    #[deprecated = "Use `set_id()` instead."]
99    pub fn id(&mut self, val: &str) -> &mut Self {
100        self.set_id(val);
101        self
102    }
103    #[cfg(web_sys_unstable_apis)]
104    #[deprecated = "Use `set_name()` instead."]
105    pub fn name(&mut self, val: &str) -> &mut Self {
106        self.set_name(val);
107        self
108    }
109}