web_sys/features/
gen_RegisteredKey.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 = RegisteredKey)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RegisteredKey` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
12 pub type RegisteredKey;
13 #[doc = "Get the `appId` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
16 #[wasm_bindgen(method, getter = "appId")]
17 pub fn get_app_id(this: &RegisteredKey) -> Option<::alloc::string::String>;
18 #[doc = "Change the `appId` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
21 #[wasm_bindgen(method, setter = "appId")]
22 pub fn set_app_id(this: &RegisteredKey, val: Option<&str>);
23 #[doc = "Get the `keyHandle` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
26 #[wasm_bindgen(method, getter = "keyHandle")]
27 pub fn get_key_handle(this: &RegisteredKey) -> Option<::alloc::string::String>;
28 #[doc = "Change the `keyHandle` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
31 #[wasm_bindgen(method, setter = "keyHandle")]
32 pub fn set_key_handle(this: &RegisteredKey, val: &str);
33 #[doc = "Get the `transports` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
36 #[wasm_bindgen(method, getter = "transports")]
37 pub fn get_transports(this: &RegisteredKey) -> Option<::js_sys::Array>;
38 #[doc = "Change the `transports` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
41 #[wasm_bindgen(method, setter = "transports")]
42 pub fn set_transports(this: &RegisteredKey, val: &::wasm_bindgen::JsValue);
43 #[doc = "Get the `version` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
46 #[wasm_bindgen(method, getter = "version")]
47 pub fn get_version(this: &RegisteredKey) -> Option<::alloc::string::String>;
48 #[doc = "Change the `version` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
51 #[wasm_bindgen(method, setter = "version")]
52 pub fn set_version(this: &RegisteredKey, val: &str);
53}
54impl RegisteredKey {
55 #[doc = "Construct a new `RegisteredKey`."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"]
58 pub fn new() -> Self {
59 #[allow(unused_mut)]
60 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
61 ret
62 }
63 #[deprecated = "Use `set_app_id()` instead."]
64 pub fn app_id(&mut self, val: Option<&str>) -> &mut Self {
65 self.set_app_id(val);
66 self
67 }
68 #[deprecated = "Use `set_key_handle()` instead."]
69 pub fn key_handle(&mut self, val: &str) -> &mut Self {
70 self.set_key_handle(val);
71 self
72 }
73 #[deprecated = "Use `set_transports()` instead."]
74 pub fn transports(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self {
75 self.set_transports(val.unwrap_or(&::wasm_bindgen::JsValue::NULL));
76 self
77 }
78 #[deprecated = "Use `set_version()` instead."]
79 pub fn version(&mut self, val: &str) -> &mut Self {
80 self.set_version(val);
81 self
82 }
83}
84impl Default for RegisteredKey {
85 fn default() -> Self {
86 Self::new()
87 }
88}