web_sys/features/
gen_PublicKeyCredentialParameters.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 = PublicKeyCredentialParameters)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PublicKeyCredentialParameters` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"]
12 pub type PublicKeyCredentialParameters;
13 #[doc = "Get the `alg` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"]
16 #[wasm_bindgen(method, getter = "alg")]
17 pub fn get_alg(this: &PublicKeyCredentialParameters) -> i32;
18 #[doc = "Change the `alg` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"]
21 #[wasm_bindgen(method, setter = "alg")]
22 pub fn set_alg(this: &PublicKeyCredentialParameters, val: i32);
23 #[cfg(feature = "PublicKeyCredentialType")]
24 #[doc = "Get the `type` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"]
27 #[wasm_bindgen(method, getter = "type")]
28 pub fn get_type(this: &PublicKeyCredentialParameters) -> PublicKeyCredentialType;
29 #[cfg(feature = "PublicKeyCredentialType")]
30 #[doc = "Change the `type` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"]
33 #[wasm_bindgen(method, setter = "type")]
34 pub fn set_type(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType);
35}
36impl PublicKeyCredentialParameters {
37 #[cfg(feature = "PublicKeyCredentialType")]
38 #[doc = "Construct a new `PublicKeyCredentialParameters`."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"]
41 pub fn new(alg: i32, type_: PublicKeyCredentialType) -> Self {
42 #[allow(unused_mut)]
43 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
44 ret.set_alg(alg);
45 ret.set_type(type_);
46 ret
47 }
48 #[deprecated = "Use `set_alg()` instead."]
49 pub fn alg(&mut self, val: i32) -> &mut Self {
50 self.set_alg(val);
51 self
52 }
53 #[cfg(feature = "PublicKeyCredentialType")]
54 #[deprecated = "Use `set_type()` instead."]
55 pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self {
56 self.set_type(val);
57 self
58 }
59}