1#![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 = Transformer)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `Transformer` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
12 pub type Transformer;
13}
14impl Transformer {
15 #[doc = "Construct a new `Transformer`."]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
18 pub fn new() -> Self {
19 #[allow(unused_mut)]
20 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
21 ret
22 }
23 #[doc = "Change the `flush` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
26 pub fn flush(&mut self, val: &::js_sys::Function) -> &mut Self {
27 use wasm_bindgen::JsValue;
28 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("flush"), &JsValue::from(val));
29 debug_assert!(
30 r.is_ok(),
31 "setting properties should never fail on our dictionary objects"
32 );
33 let _ = r;
34 self
35 }
36 #[doc = "Change the `readableType` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
39 pub fn readable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
40 use wasm_bindgen::JsValue;
41 let r = ::js_sys::Reflect::set(
42 self.as_ref(),
43 &JsValue::from("readableType"),
44 &JsValue::from(val),
45 );
46 debug_assert!(
47 r.is_ok(),
48 "setting properties should never fail on our dictionary objects"
49 );
50 let _ = r;
51 self
52 }
53 #[doc = "Change the `start` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
56 pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self {
57 use wasm_bindgen::JsValue;
58 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("start"), &JsValue::from(val));
59 debug_assert!(
60 r.is_ok(),
61 "setting properties should never fail on our dictionary objects"
62 );
63 let _ = r;
64 self
65 }
66 #[doc = "Change the `transform` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
69 pub fn transform(&mut self, val: &::js_sys::Function) -> &mut Self {
70 use wasm_bindgen::JsValue;
71 let r = ::js_sys::Reflect::set(
72 self.as_ref(),
73 &JsValue::from("transform"),
74 &JsValue::from(val),
75 );
76 debug_assert!(
77 r.is_ok(),
78 "setting properties should never fail on our dictionary objects"
79 );
80 let _ = r;
81 self
82 }
83 #[doc = "Change the `writableType` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `Transformer`*"]
86 pub fn writable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
87 use wasm_bindgen::JsValue;
88 let r = ::js_sys::Reflect::set(
89 self.as_ref(),
90 &JsValue::from("writableType"),
91 &JsValue::from(val),
92 );
93 debug_assert!(
94 r.is_ok(),
95 "setting properties should never fail on our dictionary objects"
96 );
97 let _ = r;
98 self
99 }
100}
101impl Default for Transformer {
102 fn default() -> Self {
103 Self::new()
104 }
105}
106