web_sys/features/
gen_PublicKeyCredentialEntity.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 = PublicKeyCredentialEntity)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `PublicKeyCredentialEntity` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"]
12    pub type PublicKeyCredentialEntity;
13    #[doc = "Get the `icon` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"]
16    #[deprecated]
17    #[wasm_bindgen(method, getter = "icon")]
18    pub fn get_icon(this: &PublicKeyCredentialEntity) -> 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: `PublicKeyCredentialEntity`*"]
22    #[deprecated]
23    #[wasm_bindgen(method, setter = "icon")]
24    pub fn set_icon(this: &PublicKeyCredentialEntity, 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: `PublicKeyCredentialEntity`*"]
28    #[wasm_bindgen(method, getter = "name")]
29    pub fn get_name(this: &PublicKeyCredentialEntity) -> ::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: `PublicKeyCredentialEntity`*"]
33    #[wasm_bindgen(method, setter = "name")]
34    pub fn set_name(this: &PublicKeyCredentialEntity, val: &str);
35}
36impl PublicKeyCredentialEntity {
37    #[doc = "Construct a new `PublicKeyCredentialEntity`."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"]
40    pub fn new(name: &str) -> Self {
41        #[allow(unused_mut)]
42        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
43        ret.set_name(name);
44        ret
45    }
46    #[deprecated = "Use `set_icon()` instead."]
47    pub fn icon(&mut self, val: &str) -> &mut Self {
48        self.set_icon(val);
49        self
50    }
51    #[deprecated = "Use `set_name()` instead."]
52    pub fn name(&mut self, val: &str) -> &mut Self {
53        self.set_name(val);
54        self
55    }
56}