web_sys/features/
gen_PublicKeyCredentialRpEntity.rs

1#![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 = PublicKeyCredentialRpEntity)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `PublicKeyCredentialRpEntity` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
12    pub type PublicKeyCredentialRpEntity;
13    #[doc = "Get the `icon` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
16    #[deprecated]
17    #[wasm_bindgen(method, getter = "icon")]
18    pub fn get_icon(this: &PublicKeyCredentialRpEntity) -> Option<::alloc::string::String>;
19    #[doc = "Change the `icon` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
22    #[deprecated]
23    #[wasm_bindgen(method, setter = "icon")]
24    pub fn set_icon(this: &PublicKeyCredentialRpEntity, val: &str);
25    #[doc = "Get the `name` field of this object."]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
28    #[wasm_bindgen(method, getter = "name")]
29    pub fn get_name(this: &PublicKeyCredentialRpEntity) -> ::alloc::string::String;
30    #[doc = "Change the `name` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
33    #[wasm_bindgen(method, setter = "name")]
34    pub fn set_name(this: &PublicKeyCredentialRpEntity, val: &str);
35    #[doc = "Get the `id` field of this object."]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
38    #[wasm_bindgen(method, getter = "id")]
39    pub fn get_id(this: &PublicKeyCredentialRpEntity) -> Option<::alloc::string::String>;
40    #[doc = "Change the `id` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
43    #[wasm_bindgen(method, setter = "id")]
44    pub fn set_id(this: &PublicKeyCredentialRpEntity, val: &str);
45}
46impl PublicKeyCredentialRpEntity {
47    #[doc = "Construct a new `PublicKeyCredentialRpEntity`."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"]
50    pub fn new(name: &str) -> Self {
51        #[allow(unused_mut)]
52        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
53        ret.set_name(name);
54        ret
55    }
56    #[deprecated = "Use `set_icon()` instead."]
57    pub fn icon(&mut self, val: &str) -> &mut Self {
58        self.set_icon(val);
59        self
60    }
61    #[deprecated = "Use `set_name()` instead."]
62    pub fn name(&mut self, val: &str) -> &mut Self {
63        self.set_name(val);
64        self
65    }
66    #[deprecated = "Use `set_id()` instead."]
67    pub fn id(&mut self, val: &str) -> &mut Self {
68        self.set_id(val);
69        self
70    }
71}