web_sys/features/
gen_SignResponse.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 = SignResponse)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `SignResponse` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
12    pub type SignResponse;
13    #[doc = "Get the `clientData` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
16    #[wasm_bindgen(method, getter = "clientData")]
17    pub fn get_client_data(this: &SignResponse) -> Option<::alloc::string::String>;
18    #[doc = "Change the `clientData` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
21    #[wasm_bindgen(method, setter = "clientData")]
22    pub fn set_client_data(this: &SignResponse, val: &str);
23    #[doc = "Get the `errorCode` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
26    #[wasm_bindgen(method, getter = "errorCode")]
27    pub fn get_error_code(this: &SignResponse) -> Option<u16>;
28    #[doc = "Change the `errorCode` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
31    #[wasm_bindgen(method, setter = "errorCode")]
32    pub fn set_error_code(this: &SignResponse, val: Option<u16>);
33    #[doc = "Get the `errorMessage` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
36    #[wasm_bindgen(method, getter = "errorMessage")]
37    pub fn get_error_message(this: &SignResponse) -> Option<::alloc::string::String>;
38    #[doc = "Change the `errorMessage` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
41    #[wasm_bindgen(method, setter = "errorMessage")]
42    pub fn set_error_message(this: &SignResponse, val: Option<&str>);
43    #[doc = "Get the `keyHandle` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
46    #[wasm_bindgen(method, getter = "keyHandle")]
47    pub fn get_key_handle(this: &SignResponse) -> Option<::alloc::string::String>;
48    #[doc = "Change the `keyHandle` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
51    #[wasm_bindgen(method, setter = "keyHandle")]
52    pub fn set_key_handle(this: &SignResponse, val: &str);
53    #[doc = "Get the `signatureData` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
56    #[wasm_bindgen(method, getter = "signatureData")]
57    pub fn get_signature_data(this: &SignResponse) -> Option<::alloc::string::String>;
58    #[doc = "Change the `signatureData` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
61    #[wasm_bindgen(method, setter = "signatureData")]
62    pub fn set_signature_data(this: &SignResponse, val: &str);
63}
64impl SignResponse {
65    #[doc = "Construct a new `SignResponse`."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"]
68    pub fn new() -> Self {
69        #[allow(unused_mut)]
70        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
71        ret
72    }
73    #[deprecated = "Use `set_client_data()` instead."]
74    pub fn client_data(&mut self, val: &str) -> &mut Self {
75        self.set_client_data(val);
76        self
77    }
78    #[deprecated = "Use `set_error_code()` instead."]
79    pub fn error_code(&mut self, val: Option<u16>) -> &mut Self {
80        self.set_error_code(val);
81        self
82    }
83    #[deprecated = "Use `set_error_message()` instead."]
84    pub fn error_message(&mut self, val: Option<&str>) -> &mut Self {
85        self.set_error_message(val);
86        self
87    }
88    #[deprecated = "Use `set_key_handle()` instead."]
89    pub fn key_handle(&mut self, val: &str) -> &mut Self {
90        self.set_key_handle(val);
91        self
92    }
93    #[deprecated = "Use `set_signature_data()` instead."]
94    pub fn signature_data(&mut self, val: &str) -> &mut Self {
95        self.set_signature_data(val);
96        self
97    }
98}
99impl Default for SignResponse {
100    fn default() -> Self {
101        Self::new()
102    }
103}