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 = NetworkCommandOptions)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `NetworkCommandOptions` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 11 pub type NetworkCommandOptions; 12 } 13 impl NetworkCommandOptions { 14 #[doc = "Construct a new `NetworkCommandOptions`."] 15 #[doc = ""] 16 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 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 permissions(this: &Navigator) -> Result<Permissions, JsValue>21 } 22 #[doc = "Change the `cmd` field of this object."] 23 #[doc = ""] 24 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 25 pub fn cmd(&mut self, val: &str) -> &mut Self { 26 use wasm_bindgen::JsValue; 27 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("cmd"), &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 `curExternalIfname` field of this object."] 36 #[doc = ""] plugins(this: &Navigator) -> Result<PluginArray, JsValue>37 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 38 pub fn cur_external_ifname(&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("curExternalIfname"), 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 `curInternalIfname` field of this object."] 53 #[doc = ""] 54 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 55 pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { 56 use wasm_bindgen::JsValue; 57 let r = ::js_sys::Reflect::set( 58 self.as_ref(), media_capabilities(this: &Navigator) -> MediaCapabilities59 &JsValue::from("curInternalIfname"), 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; connection(this: &Navigator) -> Result<NetworkInformation, JsValue>67 self 68 } 69 #[doc = "Change the `dns1` field of this object."] 70 #[doc = ""] 71 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 72 pub fn dns1(&mut self, val: &str) -> &mut Self { 73 use wasm_bindgen::JsValue; 74 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dns1"), &JsValue::from(val)); 75 debug_assert!( 76 r.is_ok(), 77 "setting properties should never fail on our dictionary objects" 78 ); 79 let _ = r; 80 self 81 } media_devices(this: &Navigator) -> Result<MediaDevices, JsValue>82 #[doc = "Change the `dns1_long` field of this object."] 83 #[doc = ""] 84 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 85 pub fn dns1_long(&mut self, val: i32) -> &mut Self { 86 use wasm_bindgen::JsValue; 87 let r = ::js_sys::Reflect::set( 88 self.as_ref(), 89 &JsValue::from("dns1_long"), 90 &JsValue::from(val), 91 ); 92 debug_assert!( 93 r.is_ok(), 94 "setting properties should never fail on our dictionary objects" 95 ); 96 let _ = r; 97 self 98 } 99 #[doc = "Change the `dns2` field of this object."] 100 #[doc = ""] 101 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 102 pub fn dns2(&mut self, val: &str) -> &mut Self { 103 use wasm_bindgen::JsValue; 104 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dns2"), &JsValue::from(val)); 105 debug_assert!( credentials(this: &Navigator) -> CredentialsContainer106 r.is_ok(), 107 "setting properties should never fail on our dictionary objects" 108 ); 109 let _ = r; 110 self 111 } 112 #[doc = "Change the `dns2_long` field of this object."] 113 #[doc = ""] 114 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 115 pub fn dns2_long(&mut self, val: i32) -> &mut Self { 116 use wasm_bindgen::JsValue; 117 let r = ::js_sys::Reflect::set( bluetooth(this: &Navigator) -> Option<Bluetooth>118 self.as_ref(), 119 &JsValue::from("dns2_long"), 120 &JsValue::from(val), 121 ); 122 debug_assert!( 123 r.is_ok(), 124 "setting properties should never fail on our dictionary objects" 125 ); 126 let _ = r; 127 self 128 } 129 #[doc = "Change the `dnses` field of this object."] clipboard(this: &Navigator) -> Option<Clipboard>130 #[doc = ""] 131 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 132 pub fn dnses(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 133 use wasm_bindgen::JsValue; 134 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dnses"), &JsValue::from(val)); 135 debug_assert!( 136 r.is_ok(), 137 "setting properties should never fail on our dictionary objects" 138 ); 139 let _ = r; 140 self 141 } wake_lock(this: &Navigator) -> WakeLock142 #[doc = "Change the `domain` field of this object."] 143 #[doc = ""] 144 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 145 pub fn domain(&mut self, val: &str) -> &mut Self { 146 use wasm_bindgen::JsValue; 147 let r = 148 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("domain"), &JsValue::from(val)); 149 debug_assert!( 150 r.is_ok(), 151 "setting properties should never fail on our dictionary objects" 152 ); 153 let _ = r; 154 self 155 } 156 #[doc = "Change the `enable` field of this object."] 157 #[doc = ""] 158 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 159 pub fn enable(&mut self, val: bool) -> &mut Self { 160 use wasm_bindgen::JsValue; 161 let r = 162 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("enable"), &JsValue::from(val)); 163 debug_assert!( 164 r.is_ok(), 165 "setting properties should never fail on our dictionary objects" usb(this: &Navigator) -> Usb166 ); 167 let _ = r; 168 self 169 } 170 #[doc = "Change the `enabled` field of this object."] 171 #[doc = ""] 172 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 173 pub fn enabled(&mut self, val: bool) -> &mut Self { 174 use wasm_bindgen::JsValue; 175 let r = ::js_sys::Reflect::set( 176 self.as_ref(), 177 &JsValue::from("enabled"), xr(this: &Navigator) -> Xr178 &JsValue::from(val), 179 ); 180 debug_assert!( 181 r.is_ok(), 182 "setting properties should never fail on our dictionary objects" 183 ); 184 let _ = r; hardware_concurrency(this: &Navigator) -> f64185 self 186 } 187 #[doc = "Change the `endIp` field of this object."] 188 #[doc = ""] 189 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 190 pub fn end_ip(&mut self, val: &str) -> &mut Self { 191 use wasm_bindgen::JsValue; 192 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("endIp"), &JsValue::from(val)); 193 debug_assert!( 194 r.is_ok(), 195 "setting properties should never fail on our dictionary objects" 196 ); 197 let _ = r; 198 self 199 } 200 #[doc = "Change the `externalIfname` field of this object."] 201 #[doc = ""] 202 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 203 pub fn external_ifname(&mut self, val: &str) -> &mut Self { 204 use wasm_bindgen::JsValue; geolocation(this: &Navigator) -> Result<Geolocation, JsValue>205 let r = ::js_sys::Reflect::set( 206 self.as_ref(), 207 &JsValue::from("externalIfname"), 208 &JsValue::from(val), 209 ); 210 debug_assert!( 211 r.is_ok(), app_code_name(this: &Navigator) -> Result<String, JsValue>212 "setting properties should never fail on our dictionary objects" 213 ); 214 let _ = r; 215 self 216 } 217 #[doc = "Change the `gateway` field of this object."] 218 #[doc = ""] app_name(this: &Navigator) -> String219 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 220 pub fn gateway(&mut self, val: &str) -> &mut Self { 221 use wasm_bindgen::JsValue; 222 let r = ::js_sys::Reflect::set( 223 self.as_ref(), 224 &JsValue::from("gateway"), 225 &JsValue::from(val), 226 ); 227 debug_assert!( 228 r.is_ok(), 229 "setting properties should never fail on our dictionary objects" 230 ); 231 let _ = r; 232 self 233 } 234 #[doc = "Change the `gateway_long` field of this object."] 235 #[doc = ""] 236 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 237 pub fn gateway_long(&mut self, val: i32) -> &mut Self { 238 use wasm_bindgen::JsValue; 239 let r = ::js_sys::Reflect::set( user_agent(this: &Navigator) -> Result<String, JsValue>240 self.as_ref(), 241 &JsValue::from("gateway_long"), 242 &JsValue::from(val), 243 ); 244 debug_assert!( 245 r.is_ok(), 246 "setting properties should never fail on our dictionary objects" product(this: &Navigator) -> String247 ); 248 let _ = r; 249 self 250 } 251 #[doc = "Change the `gateways` field of this object."] 252 #[doc = ""] 253 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] language(this: &Navigator) -> Option<String>254 pub fn gateways(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 255 use wasm_bindgen::JsValue; 256 let r = ::js_sys::Reflect::set( 257 self.as_ref(), 258 &JsValue::from("gateways"), 259 &JsValue::from(val), 260 ); 261 debug_assert!( 262 r.is_ok(), 263 "setting properties should never fail on our dictionary objects" 264 ); 265 let _ = r; 266 self 267 } on_line(this: &Navigator) -> bool268 #[doc = "Change the `id` field of this object."] 269 #[doc = ""] 270 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 271 pub fn id(&mut self, val: i32) -> &mut Self { 272 use wasm_bindgen::JsValue; 273 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("id"), &JsValue::from(val)); 274 debug_assert!( 275 r.is_ok(), 276 "setting properties should never fail on our dictionary objects" 277 ); 278 let _ = r; 279 self 280 } 281 #[doc = "Change the `ifname` field of this object."] 282 #[doc = ""] get_gamepads(this: &Navigator) -> Result<::js_sys::Array, JsValue>283 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 284 pub fn ifname(&mut self, val: &str) -> &mut Self { 285 use wasm_bindgen::JsValue; 286 let r = 287 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ifname"), &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 `interfaceList` field of this object."] 296 #[doc = ""] 297 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] request_gamepad_service_test(this: &Navigator) -> GamepadServiceTest298 pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 299 use wasm_bindgen::JsValue; 300 let r = ::js_sys::Reflect::set( 301 self.as_ref(), 302 &JsValue::from("interfaceList"), 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 `internalIfname` field of this object."] request_midi_access_with_options( this: &Navigator, options: &MidiOptions, ) -> Result<::js_sys::Promise, JsValue>313 #[doc = ""] 314 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 315 pub fn internal_ifname(&mut self, val: &str) -> &mut Self { 316 use wasm_bindgen::JsValue; 317 let r = ::js_sys::Reflect::set( 318 self.as_ref(), 319 &JsValue::from("internalIfname"), 320 &JsValue::from(val), 321 ); 322 debug_assert!( 323 r.is_ok(), 324 "setting properties should never fail on our dictionary objects" 325 ); 326 let _ = r; 327 self 328 } 329 #[doc = "Change the `ip` field of this object."] 330 #[doc = ""] 331 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 332 pub fn ip(&mut self, val: &str) -> &mut Self { 333 use wasm_bindgen::JsValue; 334 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ip"), &JsValue::from(val)); request_vr_service_test(this: &Navigator) -> VrServiceTest335 debug_assert!( 336 r.is_ok(), 337 "setting properties should never fail on our dictionary objects" 338 ); 339 let _ = r; 340 self 341 } send_beacon(this: &Navigator, url: &str) -> Result<bool, JsValue>342 #[doc = "Change the `ipaddr` field of this object."] 343 #[doc = ""] 344 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 345 pub fn ipaddr(&mut self, val: i32) -> &mut Self { 346 use wasm_bindgen::JsValue; 347 let r = 348 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ipaddr"), &JsValue::from(val)); 349 debug_assert!( 350 r.is_ok(), 351 "setting properties should never fail on our dictionary objects" 352 ); 353 let _ = r; 354 self 355 } 356 #[doc = "Change the `key` field of this object."] 357 #[doc = ""] 358 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 359 pub fn key(&mut self, val: &str) -> &mut Self { 360 use wasm_bindgen::JsValue; send_beacon_with_opt_buffer_source( this: &Navigator, url: &str, data: Option<&::js_sys::Object>, ) -> Result<bool, JsValue>361 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("key"), &JsValue::from(val)); 362 debug_assert!( 363 r.is_ok(), 364 "setting properties should never fail on our dictionary objects" 365 ); 366 let _ = r; 367 self 368 } 369 #[doc = "Change the `link` field of this object."] 370 #[doc = ""] 371 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] send_beacon_with_opt_u8_array( this: &Navigator, url: &str, data: Option<&mut [u8]>, ) -> Result<bool, JsValue>372 pub fn link(&mut self, val: &str) -> &mut Self { 373 use wasm_bindgen::JsValue; 374 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("link"), &JsValue::from(val)); 375 debug_assert!( 376 r.is_ok(), 377 "setting properties should never fail on our dictionary objects" 378 ); 379 let _ = r; 380 self 381 } 382 #[doc = "Change the `mask` field of this object."] 383 #[doc = ""] send_beacon_with_opt_form_data( this: &Navigator, url: &str, data: Option<&FormData>, ) -> Result<bool, JsValue>384 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 385 pub fn mask(&mut self, val: i32) -> &mut Self { 386 use wasm_bindgen::JsValue; 387 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("mask"), &JsValue::from(val)); 388 debug_assert!( 389 r.is_ok(), 390 "setting properties should never fail on our dictionary objects" 391 ); 392 let _ = r; 393 self 394 } 395 #[doc = "Change the `maskLength` field of this object."] send_beacon_with_opt_url_search_params( this: &Navigator, url: &str, data: Option<&UrlSearchParams>, ) -> Result<bool, JsValue>396 #[doc = ""] 397 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 398 pub fn mask_length(&mut self, val: &str) -> &mut Self { 399 use wasm_bindgen::JsValue; 400 let r = ::js_sys::Reflect::set( 401 self.as_ref(), 402 &JsValue::from("maskLength"), 403 &JsValue::from(val), 404 ); 405 debug_assert!( 406 r.is_ok(), 407 "setting properties should never fail on our dictionary objects" 408 ); 409 let _ = r; 410 self 411 } 412 #[doc = "Change the `mode` field of this object."] 413 #[doc = ""] 414 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 415 pub fn mode(&mut self, val: &str) -> &mut Self { 416 use wasm_bindgen::JsValue; 417 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("mode"), &JsValue::from(val)); 418 debug_assert!( send_beacon_with_opt_readable_stream( this: &Navigator, url: &str, data: Option<&ReadableStream>, ) -> Result<bool, JsValue>419 r.is_ok(), 420 "setting properties should never fail on our dictionary objects" 421 ); 422 let _ = r; 423 self 424 } 425 #[doc = "Change the `mtu` field of this object."] 426 #[doc = ""] 427 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 428 pub fn mtu(&mut self, val: i32) -> &mut Self { 429 use wasm_bindgen::JsValue; vibrate_with_duration(this: &Navigator, duration: u32) -> bool430 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("mtu"), &JsValue::from(val)); 431 debug_assert!( 432 r.is_ok(), 433 "setting properties should never fail on our dictionary objects" 434 ); 435 let _ = r; 436 self vibrate_with_pattern(this: &Navigator, pattern: &::wasm_bindgen::JsValue) -> bool437 } 438 #[doc = "Change the `preExternalIfname` field of this object."] 439 #[doc = ""] 440 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 441 pub fn pre_external_ifname(&mut self, val: &str) -> &mut Self { 442 use wasm_bindgen::JsValue; 443 let r = ::js_sys::Reflect::set( 444 self.as_ref(), 445 &JsValue::from("preExternalIfname"), 446 &JsValue::from(val), 447 ); 448 debug_assert!( 449 r.is_ok(), 450 "setting properties should never fail on our dictionary objects" 451 ); 452 let _ = r; 453 self 454 } 455 #[doc = "Change the `preInternalIfname` field of this object."] register_protocol_handler( this: &Navigator, scheme: &str, url: &str, title: &str, ) -> Result<(), JsValue>456 #[doc = ""] 457 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 458 pub fn pre_internal_ifname(&mut self, val: &str) -> &mut Self { 459 use wasm_bindgen::JsValue; 460 let r = ::js_sys::Reflect::set( 461 self.as_ref(), 462 &JsValue::from("preInternalIfname"), 463 &JsValue::from(val), 464 ); 465 debug_assert!( 466 r.is_ok(), 467 "setting properties should never fail on our dictionary objects" 468 ); 469 let _ = r; 470 self 471 } 472 #[doc = "Change the `prefix` field of this object."] 473 #[doc = ""] 474 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 475 pub fn prefix(&mut self, val: &str) -> &mut Self { 476 use wasm_bindgen::JsValue; 477 let r = 478 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("prefix"), &JsValue::from(val)); 479 debug_assert!( 480 r.is_ok(), 481 "setting properties should never fail on our dictionary objects" 482 ); 483 let _ = r; 484 self 485 } 486 #[doc = "Change the `prefixLength` field of this object."] 487 #[doc = ""] 488 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 489 pub fn prefix_length(&mut self, val: u32) -> &mut Self { 490 use wasm_bindgen::JsValue; 491 let r = ::js_sys::Reflect::set( 492 self.as_ref(), 493 &JsValue::from("prefixLength"), 494 &JsValue::from(val), 495 ); 496 debug_assert!( 497 r.is_ok(), 498 "setting properties should never fail on our dictionary objects" 499 ); 500 let _ = r; 501 self 502 } 503 #[doc = "Change the `report` field of this object."] 504 #[doc = ""] 505 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 506 pub fn report(&mut self, val: bool) -> &mut Self { 507 use wasm_bindgen::JsValue; 508 let r = 509 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("report"), &JsValue::from(val)); 510 debug_assert!( 511 r.is_ok(), 512 "setting properties should never fail on our dictionary objects" 513 ); 514 let _ = r; 515 self 516 } 517 #[doc = "Change the `security` field of this object."] 518 #[doc = ""] 519 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 520 pub fn security(&mut self, val: &str) -> &mut Self { 521 use wasm_bindgen::JsValue; 522 let r = ::js_sys::Reflect::set( 523 self.as_ref(), 524 &JsValue::from("security"), 525 &JsValue::from(val), 526 ); 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 `serverIp` field of this object."] 535 #[doc = ""] 536 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 537 pub fn server_ip(&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("serverIp"), 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 #[doc = "Change the `ssid` field of this object."] 552 #[doc = ""] 553 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 554 pub fn ssid(&mut self, val: &str) -> &mut Self { 555 use wasm_bindgen::JsValue; 556 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ssid"), &JsValue::from(val)); 557 debug_assert!( 558 r.is_ok(), 559 "setting properties should never fail on our dictionary objects" 560 ); 561 let _ = r; 562 self 563 } 564 #[doc = "Change the `startIp` field of this object."] 565 #[doc = ""] 566 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 567 pub fn start_ip(&mut self, val: &str) -> &mut Self { 568 use wasm_bindgen::JsValue; 569 let r = ::js_sys::Reflect::set( 570 self.as_ref(), 571 &JsValue::from("startIp"), 572 &JsValue::from(val), 573 ); 574 debug_assert!( 575 r.is_ok(), 576 "setting properties should never fail on our dictionary objects" 577 ); 578 let _ = r; 579 self 580 } 581 #[doc = "Change the `threshold` field of this object."] 582 #[doc = ""] 583 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 584 pub fn threshold(&mut self, val: f64) -> &mut Self { 585 use wasm_bindgen::JsValue; 586 let r = ::js_sys::Reflect::set( 587 self.as_ref(), 588 &JsValue::from("threshold"), 589 &JsValue::from(val), 590 ); 591 debug_assert!( 592 r.is_ok(), 593 "setting properties should never fail on our dictionary objects" 594 ); 595 let _ = r; 596 self 597 } 598 #[doc = "Change the `usbEndIp` field of this object."] 599 #[doc = ""] 600 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 601 pub fn usb_end_ip(&mut self, val: &str) -> &mut Self { 602 use wasm_bindgen::JsValue; 603 let r = ::js_sys::Reflect::set( 604 self.as_ref(), 605 &JsValue::from("usbEndIp"), 606 &JsValue::from(val), 607 ); 608 debug_assert!( 609 r.is_ok(), 610 "setting properties should never fail on our dictionary objects" 611 ); 612 let _ = r; 613 self 614 } 615 #[doc = "Change the `usbStartIp` field of this object."] 616 #[doc = ""] 617 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 618 pub fn usb_start_ip(&mut self, val: &str) -> &mut Self { 619 use wasm_bindgen::JsValue; 620 let r = ::js_sys::Reflect::set( 621 self.as_ref(), 622 &JsValue::from("usbStartIp"), 623 &JsValue::from(val), 624 ); 625 debug_assert!( 626 r.is_ok(), 627 "setting properties should never fail on our dictionary objects" 628 ); 629 let _ = r; 630 self 631 } 632 #[doc = "Change the `wifiEndIp` field of this object."] 633 #[doc = ""] 634 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 635 pub fn wifi_end_ip(&mut self, val: &str) -> &mut Self { 636 use wasm_bindgen::JsValue; 637 let r = ::js_sys::Reflect::set( 638 self.as_ref(), 639 &JsValue::from("wifiEndIp"), 640 &JsValue::from(val), 641 ); 642 debug_assert!( 643 r.is_ok(), 644 "setting properties should never fail on our dictionary objects" 645 ); 646 let _ = r; 647 self 648 } 649 #[doc = "Change the `wifiStartIp` field of this object."] 650 #[doc = ""] 651 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 652 pub fn wifi_start_ip(&mut self, val: &str) -> &mut Self { 653 use wasm_bindgen::JsValue; 654 let r = ::js_sys::Reflect::set( 655 self.as_ref(), 656 &JsValue::from("wifiStartIp"), 657 &JsValue::from(val), 658 ); 659 debug_assert!( 660 r.is_ok(), 661 "setting properties should never fail on our dictionary objects" 662 ); 663 let _ = r; 664 self 665 } 666 #[doc = "Change the `wifictrlinterfacename` field of this object."] 667 #[doc = ""] 668 #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] 669 pub fn wifictrlinterfacename(&mut self, val: &str) -> &mut Self { 670 use wasm_bindgen::JsValue; 671 let r = ::js_sys::Reflect::set( 672 self.as_ref(), 673 &JsValue::from("wifictrlinterfacename"), 674 &JsValue::from(val), 675 ); 676 debug_assert!( 677 r.is_ok(), 678 "setting properties should never fail on our dictionary objects" 679 ); 680 let _ = r; 681 self 682 } 683 } 684 impl Default for NetworkCommandOptions { 685 fn default() -> Self { 686 Self::new() 687 } 688 } 689