maxcountryman_web_sys/features/
gen_ConsoleEvent.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ConsoleEvent)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `ConsoleEvent` dictionary."]
9 #[doc = ""]
10 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
11 pub type ConsoleEvent;
12}
13impl ConsoleEvent {
14 #[doc = "Construct a new `ConsoleEvent`."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
17 pub fn new() -> Self {
18 #[allow(unused_mut)]
19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20 ret
21 }
22 #[doc = "Change the `ID` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
25 pub fn id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
26 use wasm_bindgen::JsValue;
27 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ID"), &JsValue::from(val));
28 debug_assert!(
29 r.is_ok(),
30 "setting properties should never fail on our dictionary objects"
31 );
32 let _ = r;
33 self
34 }
35 #[doc = "Change the `addonId` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
38 pub fn addon_id(&mut self, val: &str) -> &mut Self {
39 use wasm_bindgen::JsValue;
40 let r = ::js_sys::Reflect::set(
41 self.as_ref(),
42 &JsValue::from("addonId"),
43 &JsValue::from(val),
44 );
45 debug_assert!(
46 r.is_ok(),
47 "setting properties should never fail on our dictionary objects"
48 );
49 let _ = r;
50 self
51 }
52 #[doc = "Change the `arguments` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
55 pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
56 use wasm_bindgen::JsValue;
57 let r = ::js_sys::Reflect::set(
58 self.as_ref(),
59 &JsValue::from("arguments"),
60 &JsValue::from(val),
61 );
62 debug_assert!(
63 r.is_ok(),
64 "setting properties should never fail on our dictionary objects"
65 );
66 let _ = r;
67 self
68 }
69 #[doc = "Change the `columnNumber` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
72 pub fn column_number(&mut self, val: u32) -> &mut Self {
73 use wasm_bindgen::JsValue;
74 let r = ::js_sys::Reflect::set(
75 self.as_ref(),
76 &JsValue::from("columnNumber"),
77 &JsValue::from(val),
78 );
79 debug_assert!(
80 r.is_ok(),
81 "setting properties should never fail on our dictionary objects"
82 );
83 let _ = r;
84 self
85 }
86 #[doc = "Change the `consoleID` field of this object."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
89 pub fn console_id(&mut self, val: &str) -> &mut Self {
90 use wasm_bindgen::JsValue;
91 let r = ::js_sys::Reflect::set(
92 self.as_ref(),
93 &JsValue::from("consoleID"),
94 &JsValue::from(val),
95 );
96 debug_assert!(
97 r.is_ok(),
98 "setting properties should never fail on our dictionary objects"
99 );
100 let _ = r;
101 self
102 }
103 #[doc = "Change the `counter` field of this object."]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
106 pub fn counter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
107 use wasm_bindgen::JsValue;
108 let r = ::js_sys::Reflect::set(
109 self.as_ref(),
110 &JsValue::from("counter"),
111 &JsValue::from(val),
112 );
113 debug_assert!(
114 r.is_ok(),
115 "setting properties should never fail on our dictionary objects"
116 );
117 let _ = r;
118 self
119 }
120 #[doc = "Change the `filename` field of this object."]
121 #[doc = ""]
122 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
123 pub fn filename(&mut self, val: &str) -> &mut Self {
124 use wasm_bindgen::JsValue;
125 let r = ::js_sys::Reflect::set(
126 self.as_ref(),
127 &JsValue::from("filename"),
128 &JsValue::from(val),
129 );
130 debug_assert!(
131 r.is_ok(),
132 "setting properties should never fail on our dictionary objects"
133 );
134 let _ = r;
135 self
136 }
137 #[doc = "Change the `functionName` field of this object."]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
140 pub fn function_name(&mut self, val: &str) -> &mut Self {
141 use wasm_bindgen::JsValue;
142 let r = ::js_sys::Reflect::set(
143 self.as_ref(),
144 &JsValue::from("functionName"),
145 &JsValue::from(val),
146 );
147 debug_assert!(
148 r.is_ok(),
149 "setting properties should never fail on our dictionary objects"
150 );
151 let _ = r;
152 self
153 }
154 #[doc = "Change the `groupName` field of this object."]
155 #[doc = ""]
156 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
157 pub fn group_name(&mut self, val: &str) -> &mut Self {
158 use wasm_bindgen::JsValue;
159 let r = ::js_sys::Reflect::set(
160 self.as_ref(),
161 &JsValue::from("groupName"),
162 &JsValue::from(val),
163 );
164 debug_assert!(
165 r.is_ok(),
166 "setting properties should never fail on our dictionary objects"
167 );
168 let _ = r;
169 self
170 }
171 #[doc = "Change the `innerID` field of this object."]
172 #[doc = ""]
173 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
174 pub fn inner_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
175 use wasm_bindgen::JsValue;
176 let r = ::js_sys::Reflect::set(
177 self.as_ref(),
178 &JsValue::from("innerID"),
179 &JsValue::from(val),
180 );
181 debug_assert!(
182 r.is_ok(),
183 "setting properties should never fail on our dictionary objects"
184 );
185 let _ = r;
186 self
187 }
188 #[doc = "Change the `level` field of this object."]
189 #[doc = ""]
190 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
191 pub fn level(&mut self, val: &str) -> &mut Self {
192 use wasm_bindgen::JsValue;
193 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("level"), &JsValue::from(val));
194 debug_assert!(
195 r.is_ok(),
196 "setting properties should never fail on our dictionary objects"
197 );
198 let _ = r;
199 self
200 }
201 #[doc = "Change the `lineNumber` field of this object."]
202 #[doc = ""]
203 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
204 pub fn line_number(&mut self, val: u32) -> &mut Self {
205 use wasm_bindgen::JsValue;
206 let r = ::js_sys::Reflect::set(
207 self.as_ref(),
208 &JsValue::from("lineNumber"),
209 &JsValue::from(val),
210 );
211 debug_assert!(
212 r.is_ok(),
213 "setting properties should never fail on our dictionary objects"
214 );
215 let _ = r;
216 self
217 }
218 #[doc = "Change the `prefix` field of this object."]
219 #[doc = ""]
220 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
221 pub fn prefix(&mut self, val: &str) -> &mut Self {
222 use wasm_bindgen::JsValue;
223 let r =
224 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("prefix"), &JsValue::from(val));
225 debug_assert!(
226 r.is_ok(),
227 "setting properties should never fail on our dictionary objects"
228 );
229 let _ = r;
230 self
231 }
232 #[doc = "Change the `private` field of this object."]
233 #[doc = ""]
234 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
235 pub fn private(&mut self, val: bool) -> &mut Self {
236 use wasm_bindgen::JsValue;
237 let r = ::js_sys::Reflect::set(
238 self.as_ref(),
239 &JsValue::from("private"),
240 &JsValue::from(val),
241 );
242 debug_assert!(
243 r.is_ok(),
244 "setting properties should never fail on our dictionary objects"
245 );
246 let _ = r;
247 self
248 }
249 #[doc = "Change the `styles` field of this object."]
250 #[doc = ""]
251 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
252 pub fn styles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
253 use wasm_bindgen::JsValue;
254 let r =
255 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("styles"), &JsValue::from(val));
256 debug_assert!(
257 r.is_ok(),
258 "setting properties should never fail on our dictionary objects"
259 );
260 let _ = r;
261 self
262 }
263 #[doc = "Change the `timeStamp` field of this object."]
264 #[doc = ""]
265 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
266 pub fn time_stamp(&mut self, val: f64) -> &mut Self {
267 use wasm_bindgen::JsValue;
268 let r = ::js_sys::Reflect::set(
269 self.as_ref(),
270 &JsValue::from("timeStamp"),
271 &JsValue::from(val),
272 );
273 debug_assert!(
274 r.is_ok(),
275 "setting properties should never fail on our dictionary objects"
276 );
277 let _ = r;
278 self
279 }
280 #[doc = "Change the `timer` field of this object."]
281 #[doc = ""]
282 #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"]
283 pub fn timer(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
284 use wasm_bindgen::JsValue;
285 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("timer"), &JsValue::from(val));
286 debug_assert!(
287 r.is_ok(),
288 "setting properties should never fail on our dictionary objects"
289 );
290 let _ = r;
291 self
292 }
293}
294impl Default for ConsoleEvent {
295 fn default() -> Self {
296 Self::new()
297 }
298}