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