web_sys/features/
gen_HkdfParams.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 = HkdfParams)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `HkdfParams` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
12    pub type HkdfParams;
13    #[doc = "Get the `name` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
16    #[wasm_bindgen(method, getter = "name")]
17    pub fn get_name(this: &HkdfParams) -> ::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: `HkdfParams`*"]
21    #[wasm_bindgen(method, setter = "name")]
22    pub fn set_name(this: &HkdfParams, val: &str);
23    #[doc = "Get the `hash` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
26    #[wasm_bindgen(method, getter = "hash")]
27    pub fn get_hash(this: &HkdfParams) -> ::wasm_bindgen::JsValue;
28    #[doc = "Change the `hash` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
31    #[wasm_bindgen(method, setter = "hash")]
32    pub fn set_hash(this: &HkdfParams, val: &::wasm_bindgen::JsValue);
33    #[doc = "Get the `info` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
36    #[wasm_bindgen(method, getter = "info")]
37    pub fn get_info(this: &HkdfParams) -> ::js_sys::Object;
38    #[doc = "Change the `info` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
41    #[wasm_bindgen(method, setter = "info")]
42    pub fn set_info(this: &HkdfParams, val: &::js_sys::Object);
43    #[doc = "Get the `salt` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
46    #[wasm_bindgen(method, getter = "salt")]
47    pub fn get_salt(this: &HkdfParams) -> ::js_sys::Object;
48    #[doc = "Change the `salt` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
51    #[wasm_bindgen(method, setter = "salt")]
52    pub fn set_salt(this: &HkdfParams, val: &::js_sys::Object);
53}
54impl HkdfParams {
55    #[doc = "Construct a new `HkdfParams`."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"]
58    pub fn new(
59        name: &str,
60        hash: &::wasm_bindgen::JsValue,
61        info: &::js_sys::Object,
62        salt: &::js_sys::Object,
63    ) -> Self {
64        #[allow(unused_mut)]
65        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
66        ret.set_name(name);
67        ret.set_hash(hash);
68        ret.set_info(info);
69        ret.set_salt(salt);
70        ret
71    }
72    #[deprecated = "Use `set_name()` instead."]
73    pub fn name(&mut self, val: &str) -> &mut Self {
74        self.set_name(val);
75        self
76    }
77    #[deprecated = "Use `set_hash()` instead."]
78    pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
79        self.set_hash(val);
80        self
81    }
82    #[deprecated = "Use `set_info()` instead."]
83    pub fn info(&mut self, val: &::js_sys::Object) -> &mut Self {
84        self.set_info(val);
85        self
86    }
87    #[deprecated = "Use `set_salt()` instead."]
88    pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self {
89        self.set_salt(val);
90        self
91    }
92}