maxcountryman_web_sys/features/
gen_AesDerivedKeyParams.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = AesDerivedKeyParams)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `AesDerivedKeyParams` dictionary."]
9 #[doc = ""]
10 #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
11 pub type AesDerivedKeyParams;
12}
13impl AesDerivedKeyParams {
14 #[doc = "Construct a new `AesDerivedKeyParams`."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
17 pub fn new(name: &str, length: u32) -> Self {
18 #[allow(unused_mut)]
19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20 ret.name(name);
21 ret.length(length);
22 ret
23 }
24 #[doc = "Change the `name` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
27 pub fn name(&mut self, val: &str) -> &mut Self {
28 use wasm_bindgen::JsValue;
29 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val));
30 debug_assert!(
31 r.is_ok(),
32 "setting properties should never fail on our dictionary objects"
33 );
34 let _ = r;
35 self
36 }
37 #[doc = "Change the `length` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"]
40 pub fn length(&mut self, val: u32) -> &mut Self {
41 use wasm_bindgen::JsValue;
42 let r =
43 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("length"), &JsValue::from(val));
44 debug_assert!(
45 r.is_ok(),
46 "setting properties should never fail on our dictionary objects"
47 );
48 let _ = r;
49 self
50 }
51}