web_sys/features/
gen_AesCtrParams.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 = AesCtrParams)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `AesCtrParams` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
12 pub type AesCtrParams;
13 #[doc = "Get the `name` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
16 #[wasm_bindgen(method, getter = "name")]
17 pub fn get_name(this: &AesCtrParams) -> ::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: `AesCtrParams`*"]
21 #[wasm_bindgen(method, setter = "name")]
22 pub fn set_name(this: &AesCtrParams, val: &str);
23 #[doc = "Get the `counter` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
26 #[wasm_bindgen(method, getter = "counter")]
27 pub fn get_counter(this: &AesCtrParams) -> ::js_sys::Object;
28 #[doc = "Change the `counter` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
31 #[wasm_bindgen(method, setter = "counter")]
32 pub fn set_counter(this: &AesCtrParams, val: &::js_sys::Object);
33 #[doc = "Get the `length` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
36 #[wasm_bindgen(method, getter = "length")]
37 pub fn get_length(this: &AesCtrParams) -> u8;
38 #[doc = "Change the `length` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
41 #[wasm_bindgen(method, setter = "length")]
42 pub fn set_length(this: &AesCtrParams, val: u8);
43}
44impl AesCtrParams {
45 #[doc = "Construct a new `AesCtrParams`."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"]
48 pub fn new(name: &str, counter: &::js_sys::Object, length: u8) -> Self {
49 #[allow(unused_mut)]
50 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
51 ret.set_name(name);
52 ret.set_counter(counter);
53 ret.set_length(length);
54 ret
55 }
56 #[deprecated = "Use `set_name()` instead."]
57 pub fn name(&mut self, val: &str) -> &mut Self {
58 self.set_name(val);
59 self
60 }
61 #[deprecated = "Use `set_counter()` instead."]
62 pub fn counter(&mut self, val: &::js_sys::Object) -> &mut Self {
63 self.set_counter(val);
64 self
65 }
66 #[deprecated = "Use `set_length()` instead."]
67 pub fn length(&mut self, val: u8) -> &mut Self {
68 self.set_length(val);
69 self
70 }
71}