web_sys/features/
gen_PublicKeyCredentialDescriptorJson.rs1#![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 = "PublicKeyCredentialDescriptorJSON"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `PublicKeyCredentialDescriptorJson` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
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 PublicKeyCredentialDescriptorJson;
20 #[cfg(web_sys_unstable_apis)]
21 #[doc = "Get the `id` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
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 = "id")]
28 pub fn get_id(this: &PublicKeyCredentialDescriptorJson) -> ::alloc::string::String;
29 #[cfg(web_sys_unstable_apis)]
30 #[doc = "Change the `id` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
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 = "id")]
37 pub fn set_id(this: &PublicKeyCredentialDescriptorJson, val: &str);
38 #[cfg(web_sys_unstable_apis)]
39 #[doc = "Get the `transports` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
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 = "transports")]
46 pub fn get_transports(
47 this: &PublicKeyCredentialDescriptorJson,
48 ) -> Option<::js_sys::Array<::js_sys::JsString>>;
49 #[cfg(web_sys_unstable_apis)]
50 #[doc = "Change the `transports` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
53 #[doc = ""]
54 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56 #[wasm_bindgen(method, setter = "transports")]
57 pub fn set_transports(this: &PublicKeyCredentialDescriptorJson, val: &[::js_sys::JsString]);
58 #[cfg(web_sys_unstable_apis)]
59 #[doc = "Get the `type` field of this object."]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
62 #[doc = ""]
63 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
65 #[wasm_bindgen(method, getter = "type")]
66 pub fn get_type(this: &PublicKeyCredentialDescriptorJson) -> ::alloc::string::String;
67 #[cfg(web_sys_unstable_apis)]
68 #[doc = "Change the `type` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
71 #[doc = ""]
72 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
74 #[wasm_bindgen(method, setter = "type")]
75 pub fn set_type(this: &PublicKeyCredentialDescriptorJson, val: &str);
76}
77#[cfg(web_sys_unstable_apis)]
78impl PublicKeyCredentialDescriptorJson {
79 #[doc = "Construct a new `PublicKeyCredentialDescriptorJson`."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptorJson`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 pub fn new(id: &str, type_: &str) -> Self {
86 #[allow(unused_mut)]
87 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
88 ret.set_id(id);
89 ret.set_type(type_);
90 ret
91 }
92 #[cfg(web_sys_unstable_apis)]
93 #[deprecated = "Use `set_id()` instead."]
94 pub fn id(&mut self, val: &str) -> &mut Self {
95 self.set_id(val);
96 self
97 }
98 #[cfg(web_sys_unstable_apis)]
99 #[deprecated = "Use `set_transports()` instead."]
100 pub fn transports(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
101 self.set_transports(val);
102 self
103 }
104 #[cfg(web_sys_unstable_apis)]
105 #[deprecated = "Use `set_type()` instead."]
106 pub fn type_(&mut self, val: &str) -> &mut Self {
107 self.set_type(val);
108 self
109 }
110}