1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = IIRFilterOptions)]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `IirFilterOptions` dictionary."]
9     #[doc = ""]
10     #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
11     pub type IirFilterOptions;
12 }
13 impl IirFilterOptions {
14     #[doc = "Construct a new `IirFilterOptions`."]
15     #[doc = ""]
16     #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
new(feedback: &::wasm_bindgen::JsValue, feedforward: &::wasm_bindgen::JsValue) -> Self17     pub fn new(feedback: &::wasm_bindgen::JsValue, feedforward: &::wasm_bindgen::JsValue) -> Self {
18         #[allow(unused_mut)]
19         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20         ret.feedback(feedback);
21         ret.feedforward(feedforward);
22         ret
23     }
24     #[doc = "Change the `channelCount` field of this object."]
25     #[doc = ""]
26     #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
channel_count(&mut self, val: u32) -> &mut Self27     pub fn channel_count(&mut self, val: u32) -> &mut Self {
28         use wasm_bindgen::JsValue;
29         let r = ::js_sys::Reflect::set(
30             self.as_ref(),
31             &JsValue::from("channelCount"),
32             &JsValue::from(val),
33         );
34         debug_assert!(
35             r.is_ok(),
36             "setting properties should never fail on our dictionary objects"
37         );
38         let _ = r;
39         self
40     }
41     #[cfg(feature = "ChannelCountMode")]
42     #[doc = "Change the `channelCountMode` field of this object."]
43     #[doc = ""]
44     #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"]
channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self45     pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
46         use wasm_bindgen::JsValue;
47         let r = ::js_sys::Reflect::set(
48             self.as_ref(),
49             &JsValue::from("channelCountMode"),
50             &JsValue::from(val),
51         );
52         debug_assert!(
53             r.is_ok(),
54             "setting properties should never fail on our dictionary objects"
55         );
56         let _ = r;
57         self
58     }
59     #[cfg(feature = "ChannelInterpretation")]
60     #[doc = "Change the `channelInterpretation` field of this object."]
61     #[doc = ""]
62     #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"]
channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self63     pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
64         use wasm_bindgen::JsValue;
65         let r = ::js_sys::Reflect::set(
66             self.as_ref(),
67             &JsValue::from("channelInterpretation"),
68             &JsValue::from(val),
69         );
70         debug_assert!(
71             r.is_ok(),
72             "setting properties should never fail on our dictionary objects"
73         );
74         let _ = r;
75         self
76     }
77     #[doc = "Change the `feedback` field of this object."]
78     #[doc = ""]
79     #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
feedback(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self80     pub fn feedback(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
81         use wasm_bindgen::JsValue;
82         let r = ::js_sys::Reflect::set(
83             self.as_ref(),
84             &JsValue::from("feedback"),
85             &JsValue::from(val),
86         );
87         debug_assert!(
88             r.is_ok(),
89             "setting properties should never fail on our dictionary objects"
90         );
91         let _ = r;
92         self
93     }
94     #[doc = "Change the `feedforward` field of this object."]
95     #[doc = ""]
96     #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
feedforward(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self97     pub fn feedforward(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
98         use wasm_bindgen::JsValue;
99         let r = ::js_sys::Reflect::set(
100             self.as_ref(),
101             &JsValue::from("feedforward"),
102             &JsValue::from(val),
103         );
104         debug_assert!(
105             r.is_ok(),
106             "setting properties should never fail on our dictionary objects"
107         );
108         let _ = r;
109         self
110     }
111 }
112