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