1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = NetworkResultOptions)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `NetworkResultOptions` dictionary."]
9 #[doc = ""]
10 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
11 pub type NetworkResultOptions;
12}
13impl NetworkResultOptions {
14 #[doc = "Construct a new `NetworkResultOptions`."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
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 `broadcast` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
25 pub fn broadcast(&mut self, val: bool) -> &mut Self {
26 use wasm_bindgen::JsValue;
27 let r = ::js_sys::Reflect::set(
28 self.as_ref(),
29 &JsValue::from("broadcast"),
30 &JsValue::from(val),
31 );
32 debug_assert!(
33 r.is_ok(),
34 "setting properties should never fail on our dictionary objects"
35 );
36 let _ = r;
37 self
38 }
39 #[doc = "Change the `curExternalIfname` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
42 pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self {
43 use wasm_bindgen::JsValue;
44 let r = ::js_sys::Reflect::set(
45 self.as_ref(),
46 &JsValue::from("curExternalIfname"),
47 &JsValue::from(val),
48 );
49 debug_assert!(
50 r.is_ok(),
51 "setting properties should never fail on our dictionary objects"
52 );
53 let _ = r;
54 self
55 }
56 #[doc = "Change the `curInternalIfname` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
59 pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self {
60 use wasm_bindgen::JsValue;
61 let r = ::js_sys::Reflect::set(
62 self.as_ref(),
63 &JsValue::from("curInternalIfname"),
64 &JsValue::from(val),
65 );
66 debug_assert!(
67 r.is_ok(),
68 "setting properties should never fail on our dictionary objects"
69 );
70 let _ = r;
71 self
72 }
73 #[doc = "Change the `dns1` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
76 pub fn dns1(&mut self, val: i32) -> &mut Self {
77 use wasm_bindgen::JsValue;
78 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dns1"), &JsValue::from(val));
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 `dns1_str` field of this object."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
89 pub fn dns1_str(&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("dns1_str"),
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 `dns2` field of this object."]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
106 pub fn dns2(&mut self, val: i32) -> &mut Self {
107 use wasm_bindgen::JsValue;
108 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dns2"), &JsValue::from(val));
109 debug_assert!(
110 r.is_ok(),
111 "setting properties should never fail on our dictionary objects"
112 );
113 let _ = r;
114 self
115 }
116 #[doc = "Change the `dns2_str` field of this object."]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
119 pub fn dns2_str(&mut self, val: &str) -> &mut Self {
120 use wasm_bindgen::JsValue;
121 let r = ::js_sys::Reflect::set(
122 self.as_ref(),
123 &JsValue::from("dns2_str"),
124 &JsValue::from(val),
125 );
126 debug_assert!(
127 r.is_ok(),
128 "setting properties should never fail on our dictionary objects"
129 );
130 let _ = r;
131 self
132 }
133 #[doc = "Change the `enable` field of this object."]
134 #[doc = ""]
135 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
136 pub fn enable(&mut self, val: bool) -> &mut Self {
137 use wasm_bindgen::JsValue;
138 let r =
139 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("enable"), &JsValue::from(val));
140 debug_assert!(
141 r.is_ok(),
142 "setting properties should never fail on our dictionary objects"
143 );
144 let _ = r;
145 self
146 }
147 #[doc = "Change the `error` field of this object."]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
150 pub fn error(&mut self, val: bool) -> &mut Self {
151 use wasm_bindgen::JsValue;
152 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("error"), &JsValue::from(val));
153 debug_assert!(
154 r.is_ok(),
155 "setting properties should never fail on our dictionary objects"
156 );
157 let _ = r;
158 self
159 }
160 #[doc = "Change the `flag` field of this object."]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
163 pub fn flag(&mut self, val: &str) -> &mut Self {
164 use wasm_bindgen::JsValue;
165 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("flag"), &JsValue::from(val));
166 debug_assert!(
167 r.is_ok(),
168 "setting properties should never fail on our dictionary objects"
169 );
170 let _ = r;
171 self
172 }
173 #[doc = "Change the `gateway` field of this object."]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
176 pub fn gateway(&mut self, val: i32) -> &mut Self {
177 use wasm_bindgen::JsValue;
178 let r = ::js_sys::Reflect::set(
179 self.as_ref(),
180 &JsValue::from("gateway"),
181 &JsValue::from(val),
182 );
183 debug_assert!(
184 r.is_ok(),
185 "setting properties should never fail on our dictionary objects"
186 );
187 let _ = r;
188 self
189 }
190 #[doc = "Change the `gateway_str` field of this object."]
191 #[doc = ""]
192 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
193 pub fn gateway_str(&mut self, val: &str) -> &mut Self {
194 use wasm_bindgen::JsValue;
195 let r = ::js_sys::Reflect::set(
196 self.as_ref(),
197 &JsValue::from("gateway_str"),
198 &JsValue::from(val),
199 );
200 debug_assert!(
201 r.is_ok(),
202 "setting properties should never fail on our dictionary objects"
203 );
204 let _ = r;
205 self
206 }
207 #[doc = "Change the `id` field of this object."]
208 #[doc = ""]
209 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
210 pub fn id(&mut self, val: i32) -> &mut Self {
211 use wasm_bindgen::JsValue;
212 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("id"), &JsValue::from(val));
213 debug_assert!(
214 r.is_ok(),
215 "setting properties should never fail on our dictionary objects"
216 );
217 let _ = r;
218 self
219 }
220 #[doc = "Change the `interfaceList` field of this object."]
221 #[doc = ""]
222 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
223 pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
224 use wasm_bindgen::JsValue;
225 let r = ::js_sys::Reflect::set(
226 self.as_ref(),
227 &JsValue::from("interfaceList"),
228 &JsValue::from(val),
229 );
230 debug_assert!(
231 r.is_ok(),
232 "setting properties should never fail on our dictionary objects"
233 );
234 let _ = r;
235 self
236 }
237 #[doc = "Change the `ipAddr` field of this object."]
238 #[doc = ""]
239 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
240 pub fn ip_addr(&mut self, val: &str) -> &mut Self {
241 use wasm_bindgen::JsValue;
242 let r =
243 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ipAddr"), &JsValue::from(val));
244 debug_assert!(
245 r.is_ok(),
246 "setting properties should never fail on our dictionary objects"
247 );
248 let _ = r;
249 self
250 }
251 #[doc = "Change the `ipaddr` field of this object."]
252 #[doc = ""]
253 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
254 pub fn ipaddr(&mut self, val: i32) -> &mut Self {
255 use wasm_bindgen::JsValue;
256 let r =
257 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ipaddr"), &JsValue::from(val));
258 debug_assert!(
259 r.is_ok(),
260 "setting properties should never fail on our dictionary objects"
261 );
262 let _ = r;
263 self
264 }
265 #[doc = "Change the `ipaddr_str` field of this object."]
266 #[doc = ""]
267 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
268 pub fn ipaddr_str(&mut self, val: &str) -> &mut Self {
269 use wasm_bindgen::JsValue;
270 let r = ::js_sys::Reflect::set(
271 self.as_ref(),
272 &JsValue::from("ipaddr_str"),
273 &JsValue::from(val),
274 );
275 debug_assert!(
276 r.is_ok(),
277 "setting properties should never fail on our dictionary objects"
278 );
279 let _ = r;
280 self
281 }
282 #[doc = "Change the `lease` field of this object."]
283 #[doc = ""]
284 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
285 pub fn lease(&mut self, val: i32) -> &mut Self {
286 use wasm_bindgen::JsValue;
287 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("lease"), &JsValue::from(val));
288 debug_assert!(
289 r.is_ok(),
290 "setting properties should never fail on our dictionary objects"
291 );
292 let _ = r;
293 self
294 }
295 #[doc = "Change the `macAddr` field of this object."]
296 #[doc = ""]
297 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
298 pub fn mac_addr(&mut self, val: &str) -> &mut Self {
299 use wasm_bindgen::JsValue;
300 let r = ::js_sys::Reflect::set(
301 self.as_ref(),
302 &JsValue::from("macAddr"),
303 &JsValue::from(val),
304 );
305 debug_assert!(
306 r.is_ok(),
307 "setting properties should never fail on our dictionary objects"
308 );
309 let _ = r;
310 self
311 }
312 #[doc = "Change the `mask` field of this object."]
313 #[doc = ""]
314 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
315 pub fn mask(&mut self, val: i32) -> &mut Self {
316 use wasm_bindgen::JsValue;
317 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("mask"), &JsValue::from(val));
318 debug_assert!(
319 r.is_ok(),
320 "setting properties should never fail on our dictionary objects"
321 );
322 let _ = r;
323 self
324 }
325 #[doc = "Change the `mask_str` field of this object."]
326 #[doc = ""]
327 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
328 pub fn mask_str(&mut self, val: &str) -> &mut Self {
329 use wasm_bindgen::JsValue;
330 let r = ::js_sys::Reflect::set(
331 self.as_ref(),
332 &JsValue::from("mask_str"),
333 &JsValue::from(val),
334 );
335 debug_assert!(
336 r.is_ok(),
337 "setting properties should never fail on our dictionary objects"
338 );
339 let _ = r;
340 self
341 }
342 #[doc = "Change the `netId` field of this object."]
343 #[doc = ""]
344 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
345 pub fn net_id(&mut self, val: &str) -> &mut Self {
346 use wasm_bindgen::JsValue;
347 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("netId"), &JsValue::from(val));
348 debug_assert!(
349 r.is_ok(),
350 "setting properties should never fail on our dictionary objects"
351 );
352 let _ = r;
353 self
354 }
355 #[doc = "Change the `prefixLength` field of this object."]
356 #[doc = ""]
357 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
358 pub fn prefix_length(&mut self, val: i32) -> &mut Self {
359 use wasm_bindgen::JsValue;
360 let r = ::js_sys::Reflect::set(
361 self.as_ref(),
362 &JsValue::from("prefixLength"),
363 &JsValue::from(val),
364 );
365 debug_assert!(
366 r.is_ok(),
367 "setting properties should never fail on our dictionary objects"
368 );
369 let _ = r;
370 self
371 }
372 #[doc = "Change the `reason` field of this object."]
373 #[doc = ""]
374 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
375 pub fn reason(&mut self, val: &str) -> &mut Self {
376 use wasm_bindgen::JsValue;
377 let r =
378 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("reason"), &JsValue::from(val));
379 debug_assert!(
380 r.is_ok(),
381 "setting properties should never fail on our dictionary objects"
382 );
383 let _ = r;
384 self
385 }
386 #[doc = "Change the `reply` field of this object."]
387 #[doc = ""]
388 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
389 pub fn reply(&mut self, val: &str) -> &mut Self {
390 use wasm_bindgen::JsValue;
391 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("reply"), &JsValue::from(val));
392 debug_assert!(
393 r.is_ok(),
394 "setting properties should never fail on our dictionary objects"
395 );
396 let _ = r;
397 self
398 }
399 #[doc = "Change the `result` field of this object."]
400 #[doc = ""]
401 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
402 pub fn result(&mut self, val: bool) -> &mut Self {
403 use wasm_bindgen::JsValue;
404 let r =
405 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("result"), &JsValue::from(val));
406 debug_assert!(
407 r.is_ok(),
408 "setting properties should never fail on our dictionary objects"
409 );
410 let _ = r;
411 self
412 }
413 #[doc = "Change the `resultCode` field of this object."]
414 #[doc = ""]
415 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
416 pub fn result_code(&mut self, val: i32) -> &mut Self {
417 use wasm_bindgen::JsValue;
418 let r = ::js_sys::Reflect::set(
419 self.as_ref(),
420 &JsValue::from("resultCode"),
421 &JsValue::from(val),
422 );
423 debug_assert!(
424 r.is_ok(),
425 "setting properties should never fail on our dictionary objects"
426 );
427 let _ = r;
428 self
429 }
430 #[doc = "Change the `resultReason` field of this object."]
431 #[doc = ""]
432 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
433 pub fn result_reason(&mut self, val: &str) -> &mut Self {
434 use wasm_bindgen::JsValue;
435 let r = ::js_sys::Reflect::set(
436 self.as_ref(),
437 &JsValue::from("resultReason"),
438 &JsValue::from(val),
439 );
440 debug_assert!(
441 r.is_ok(),
442 "setting properties should never fail on our dictionary objects"
443 );
444 let _ = r;
445 self
446 }
447 #[doc = "Change the `ret` field of this object."]
448 #[doc = ""]
449 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
450 pub fn ret(&mut self, val: bool) -> &mut Self {
451 use wasm_bindgen::JsValue;
452 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ret"), &JsValue::from(val));
453 debug_assert!(
454 r.is_ok(),
455 "setting properties should never fail on our dictionary objects"
456 );
457 let _ = r;
458 self
459 }
460 #[doc = "Change the `route` field of this object."]
461 #[doc = ""]
462 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
463 pub fn route(&mut self, val: &str) -> &mut Self {
464 use wasm_bindgen::JsValue;
465 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("route"), &JsValue::from(val));
466 debug_assert!(
467 r.is_ok(),
468 "setting properties should never fail on our dictionary objects"
469 );
470 let _ = r;
471 self
472 }
473 #[doc = "Change the `server` field of this object."]
474 #[doc = ""]
475 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
476 pub fn server(&mut self, val: i32) -> &mut Self {
477 use wasm_bindgen::JsValue;
478 let r =
479 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("server"), &JsValue::from(val));
480 debug_assert!(
481 r.is_ok(),
482 "setting properties should never fail on our dictionary objects"
483 );
484 let _ = r;
485 self
486 }
487 #[doc = "Change the `server_str` field of this object."]
488 #[doc = ""]
489 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
490 pub fn server_str(&mut self, val: &str) -> &mut Self {
491 use wasm_bindgen::JsValue;
492 let r = ::js_sys::Reflect::set(
493 self.as_ref(),
494 &JsValue::from("server_str"),
495 &JsValue::from(val),
496 );
497 debug_assert!(
498 r.is_ok(),
499 "setting properties should never fail on our dictionary objects"
500 );
501 let _ = r;
502 self
503 }
504 #[doc = "Change the `success` field of this object."]
505 #[doc = ""]
506 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
507 pub fn success(&mut self, val: bool) -> &mut Self {
508 use wasm_bindgen::JsValue;
509 let r = ::js_sys::Reflect::set(
510 self.as_ref(),
511 &JsValue::from("success"),
512 &JsValue::from(val),
513 );
514 debug_assert!(
515 r.is_ok(),
516 "setting properties should never fail on our dictionary objects"
517 );
518 let _ = r;
519 self
520 }
521 #[doc = "Change the `topic` field of this object."]
522 #[doc = ""]
523 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
524 pub fn topic(&mut self, val: &str) -> &mut Self {
525 use wasm_bindgen::JsValue;
526 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("topic"), &JsValue::from(val));
527 debug_assert!(
528 r.is_ok(),
529 "setting properties should never fail on our dictionary objects"
530 );
531 let _ = r;
532 self
533 }
534 #[doc = "Change the `vendor_str` field of this object."]
535 #[doc = ""]
536 #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"]
537 pub fn vendor_str(&mut self, val: &str) -> &mut Self {
538 use wasm_bindgen::JsValue;
539 let r = ::js_sys::Reflect::set(
540 self.as_ref(),
541 &JsValue::from("vendor_str"),
542 &JsValue::from(val),
543 );
544 debug_assert!(
545 r.is_ok(),
546 "setting properties should never fail on our dictionary objects"
547 );
548 let _ = r;
549 self
550 }
551}
552impl Default for NetworkResultOptions {
553 fn default() -> Self {
554 Self::new()
555 }
556}