web_sys/features/
gen_PublicKeyCredential.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = Credential , extends = :: js_sys :: Object , js_name = PublicKeyCredential , typescript_type = "PublicKeyCredential")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `PublicKeyCredential` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
14    pub type PublicKeyCredential;
15    # [wasm_bindgen (structural , method , getter , js_class = "PublicKeyCredential" , js_name = rawId)]
16    #[doc = "Getter for the `rawId` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/rawId)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
21    pub fn raw_id(this: &PublicKeyCredential) -> ::js_sys::ArrayBuffer;
22    #[cfg(feature = "AuthenticatorResponse")]
23    # [wasm_bindgen (structural , method , getter , js_class = "PublicKeyCredential" , js_name = response)]
24    #[doc = "Getter for the `response` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/response)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorResponse`, `PublicKeyCredential`*"]
29    pub fn response(this: &PublicKeyCredential) -> AuthenticatorResponse;
30    #[cfg(web_sys_unstable_apis)]
31    # [wasm_bindgen (structural , method , getter , js_class = "PublicKeyCredential" , js_name = authenticatorAttachment)]
32    #[doc = "Getter for the `authenticatorAttachment` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/authenticatorAttachment)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
37    #[doc = ""]
38    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40    pub fn authenticator_attachment(this: &PublicKeyCredential) -> Option<::alloc::string::String>;
41    #[cfg(feature = "AuthenticationExtensionsClientOutputs")]
42    # [wasm_bindgen (method , structural , js_class = "PublicKeyCredential" , js_name = getClientExtensionResults)]
43    #[doc = "The `getClientExtensionResults()` method."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/getClientExtensionResults)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`, `PublicKeyCredential`*"]
48    pub fn get_client_extension_results(
49        this: &PublicKeyCredential,
50    ) -> AuthenticationExtensionsClientOutputs;
51    #[cfg(web_sys_unstable_apis)]
52    # [wasm_bindgen (static_method_of = PublicKeyCredential , js_class = "PublicKeyCredential" , js_name = isConditionalMediationAvailable)]
53    #[doc = "The `isConditionalMediationAvailable()` method."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/isConditionalMediationAvailable_static)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
58    #[doc = ""]
59    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
61    pub fn is_conditional_mediation_available() -> ::js_sys::Promise;
62    #[cfg(web_sys_unstable_apis)]
63    # [wasm_bindgen (static_method_of = PublicKeyCredential , js_class = "PublicKeyCredential" , js_name = isPasskeyPlatformAuthenticatorAvailable)]
64    #[doc = "The `isPasskeyPlatformAuthenticatorAvailable()` method."]
65    #[doc = ""]
66    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/isPasskeyPlatformAuthenticatorAvailable_static)"]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
69    #[doc = ""]
70    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
72    pub fn is_passkey_platform_authenticator_available() -> ::js_sys::Promise;
73    # [wasm_bindgen (static_method_of = PublicKeyCredential , js_class = "PublicKeyCredential" , js_name = isUserVerifyingPlatformAuthenticatorAvailable)]
74    #[doc = "The `isUserVerifyingPlatformAuthenticatorAvailable()` method."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
79    pub fn is_user_verifying_platform_authenticator_available() -> ::js_sys::Promise;
80    #[cfg(web_sys_unstable_apis)]
81    #[cfg(all(
82        feature = "PublicKeyCredentialCreationOptions",
83        feature = "PublicKeyCredentialCreationOptionsJson",
84    ))]
85    # [wasm_bindgen (catch , static_method_of = PublicKeyCredential , js_class = "PublicKeyCredential" , js_name = parseCreationOptionsFromJSON)]
86    #[doc = "The `parseCreationOptionsFromJSON()` method."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/parseCreationOptionsFromJSON_static)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`, `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialCreationOptionsJson`*"]
91    #[doc = ""]
92    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
94    pub fn parse_creation_options_from_json(
95        options: &PublicKeyCredentialCreationOptionsJson,
96    ) -> Result<PublicKeyCredentialCreationOptions, JsValue>;
97    #[cfg(web_sys_unstable_apis)]
98    #[cfg(all(
99        feature = "PublicKeyCredentialRequestOptions",
100        feature = "PublicKeyCredentialRequestOptionsJson",
101    ))]
102    # [wasm_bindgen (catch , static_method_of = PublicKeyCredential , js_class = "PublicKeyCredential" , js_name = parseRequestOptionsFromJSON)]
103    #[doc = "The `parseRequestOptionsFromJSON()` method."]
104    #[doc = ""]
105    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/parseRequestOptionsFromJSON_static)"]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`, `PublicKeyCredentialRequestOptions`, `PublicKeyCredentialRequestOptionsJson`*"]
108    #[doc = ""]
109    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
111    pub fn parse_request_options_from_json(
112        options: &PublicKeyCredentialRequestOptionsJson,
113    ) -> Result<PublicKeyCredentialRequestOptions, JsValue>;
114    #[cfg(web_sys_unstable_apis)]
115    # [wasm_bindgen (catch , method , structural , js_class = "PublicKeyCredential" , js_name = toJSON)]
116    #[doc = "The `toJSON()` method."]
117    #[doc = ""]
118    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/toJSON)"]
119    #[doc = ""]
120    #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredential`*"]
121    #[doc = ""]
122    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
123    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
124    pub fn to_json(this: &PublicKeyCredential) -> Result<::wasm_bindgen::JsValue, JsValue>;
125}