@@ -10,6 +10,14 @@ extern "C" {
10
10
#[ doc = "" ]
11
11
#[ doc = "*This API requires the following crate features to be activated: `AesGcmParams`*" ]
12
12
pub type AesGcmParams ;
13
+ #[ wasm_bindgen( method, setter = "name" ) ]
14
+ fn name_shim ( this : & AesGcmParams , val : & str ) ;
15
+ #[ wasm_bindgen( method, setter = "additionalData" ) ]
16
+ fn additional_data_shim ( this : & AesGcmParams , val : & :: js_sys:: Object ) ;
17
+ #[ wasm_bindgen( method, setter = "iv" ) ]
18
+ fn iv_shim ( this : & AesGcmParams , val : & :: js_sys:: Object ) ;
19
+ #[ wasm_bindgen( method, setter = "tagLength" ) ]
20
+ fn tag_length_shim ( this : & AesGcmParams , val : u8 ) ;
13
21
}
14
22
impl AesGcmParams {
15
23
#[ doc = "Construct a new `AesGcmParams`." ]
@@ -26,60 +34,28 @@ impl AesGcmParams {
26
34
#[ doc = "" ]
27
35
#[ doc = "*This API requires the following crate features to be activated: `AesGcmParams`*" ]
28
36
pub fn name ( & mut self , val : & str ) -> & mut Self {
29
- use wasm_bindgen:: JsValue ;
30
- let r = :: js_sys:: Reflect :: set ( self . as_ref ( ) , & JsValue :: from ( "name" ) , & JsValue :: from ( val) ) ;
31
- debug_assert ! (
32
- r. is_ok( ) ,
33
- "setting properties should never fail on our dictionary objects"
34
- ) ;
35
- let _ = r;
37
+ self . name_shim ( val) ;
36
38
self
37
39
}
38
40
#[ doc = "Change the `additionalData` field of this object." ]
39
41
#[ doc = "" ]
40
42
#[ doc = "*This API requires the following crate features to be activated: `AesGcmParams`*" ]
41
43
pub fn additional_data ( & mut self , val : & :: js_sys:: Object ) -> & mut Self {
42
- use wasm_bindgen:: JsValue ;
43
- let r = :: js_sys:: Reflect :: set (
44
- self . as_ref ( ) ,
45
- & JsValue :: from ( "additionalData" ) ,
46
- & JsValue :: from ( val) ,
47
- ) ;
48
- debug_assert ! (
49
- r. is_ok( ) ,
50
- "setting properties should never fail on our dictionary objects"
51
- ) ;
52
- let _ = r;
44
+ self . additional_data_shim ( val) ;
53
45
self
54
46
}
55
47
#[ doc = "Change the `iv` field of this object." ]
56
48
#[ doc = "" ]
57
49
#[ doc = "*This API requires the following crate features to be activated: `AesGcmParams`*" ]
58
50
pub fn iv ( & mut self , val : & :: js_sys:: Object ) -> & mut Self {
59
- use wasm_bindgen:: JsValue ;
60
- let r = :: js_sys:: Reflect :: set ( self . as_ref ( ) , & JsValue :: from ( "iv" ) , & JsValue :: from ( val) ) ;
61
- debug_assert ! (
62
- r. is_ok( ) ,
63
- "setting properties should never fail on our dictionary objects"
64
- ) ;
65
- let _ = r;
51
+ self . iv_shim ( val) ;
66
52
self
67
53
}
68
54
#[ doc = "Change the `tagLength` field of this object." ]
69
55
#[ doc = "" ]
70
56
#[ doc = "*This API requires the following crate features to be activated: `AesGcmParams`*" ]
71
57
pub fn tag_length ( & mut self , val : u8 ) -> & mut Self {
72
- use wasm_bindgen:: JsValue ;
73
- let r = :: js_sys:: Reflect :: set (
74
- self . as_ref ( ) ,
75
- & JsValue :: from ( "tagLength" ) ,
76
- & JsValue :: from ( val) ,
77
- ) ;
78
- debug_assert ! (
79
- r. is_ok( ) ,
80
- "setting properties should never fail on our dictionary objects"
81
- ) ;
82
- let _ = r;
58
+ self . tag_length_shim ( val) ;
83
59
self
84
60
}
85
61
}
0 commit comments