web_sys/features/
gen_CredentialCreationOptions.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 = CredentialCreationOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CredentialCreationOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`*"]
12 pub type CredentialCreationOptions;
13 #[cfg(feature = "PublicKeyCredentialCreationOptions")]
14 #[doc = "Get the `publicKey` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"]
17 #[wasm_bindgen(method, getter = "publicKey")]
18 pub fn get_public_key(
19 this: &CredentialCreationOptions,
20 ) -> Option<PublicKeyCredentialCreationOptions>;
21 #[cfg(feature = "PublicKeyCredentialCreationOptions")]
22 #[doc = "Change the `publicKey` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"]
25 #[wasm_bindgen(method, setter = "publicKey")]
26 pub fn set_public_key(
27 this: &CredentialCreationOptions,
28 val: &PublicKeyCredentialCreationOptions,
29 );
30 #[cfg(feature = "AbortSignal")]
31 #[doc = "Get the `signal` field of this object."]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"]
34 #[wasm_bindgen(method, getter = "signal")]
35 pub fn get_signal(this: &CredentialCreationOptions) -> Option<AbortSignal>;
36 #[cfg(feature = "AbortSignal")]
37 #[doc = "Change the `signal` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"]
40 #[wasm_bindgen(method, setter = "signal")]
41 pub fn set_signal(this: &CredentialCreationOptions, val: &AbortSignal);
42}
43impl CredentialCreationOptions {
44 #[doc = "Construct a new `CredentialCreationOptions`."]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`*"]
47 pub fn new() -> Self {
48 #[allow(unused_mut)]
49 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
50 ret
51 }
52 #[cfg(feature = "PublicKeyCredentialCreationOptions")]
53 #[deprecated = "Use `set_public_key()` instead."]
54 pub fn public_key(&mut self, val: &PublicKeyCredentialCreationOptions) -> &mut Self {
55 self.set_public_key(val);
56 self
57 }
58 #[cfg(feature = "AbortSignal")]
59 #[deprecated = "Use `set_signal()` instead."]
60 pub fn signal(&mut self, val: &AbortSignal) -> &mut Self {
61 self.set_signal(val);
62 self
63 }
64}
65impl Default for CredentialCreationOptions {
66 fn default() -> Self {
67 Self::new()
68 }
69}