web_sys/features/
gen_UdpMessageEventInit.rs1#![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 = UDPMessageEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `UdpMessageEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
12 pub type UdpMessageEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &UdpMessageEventInit) -> Option<bool>;
18 #[doc = "Change the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &UdpMessageEventInit, val: bool);
23 #[doc = "Get the `cancelable` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &UdpMessageEventInit) -> Option<bool>;
28 #[doc = "Change the `cancelable` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &UdpMessageEventInit, val: bool);
33 #[doc = "Get the `composed` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &UdpMessageEventInit) -> Option<bool>;
38 #[doc = "Change the `composed` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &UdpMessageEventInit, val: bool);
43 #[doc = "Get the `data` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
46 #[wasm_bindgen(method, getter = "data")]
47 pub fn get_data(this: &UdpMessageEventInit) -> ::wasm_bindgen::JsValue;
48 #[doc = "Change the `data` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
51 #[wasm_bindgen(method, setter = "data")]
52 pub fn set_data(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue);
53 #[doc = "Get the `remoteAddress` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
56 #[wasm_bindgen(method, getter = "remoteAddress")]
57 pub fn get_remote_address(this: &UdpMessageEventInit) -> Option<::alloc::string::String>;
58 #[doc = "Change the `remoteAddress` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
61 #[wasm_bindgen(method, setter = "remoteAddress")]
62 pub fn set_remote_address(this: &UdpMessageEventInit, val: &str);
63 #[doc = "Get the `remotePort` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
66 #[wasm_bindgen(method, getter = "remotePort")]
67 pub fn get_remote_port(this: &UdpMessageEventInit) -> Option<u16>;
68 #[doc = "Change the `remotePort` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
71 #[wasm_bindgen(method, setter = "remotePort")]
72 pub fn set_remote_port(this: &UdpMessageEventInit, val: u16);
73}
74impl UdpMessageEventInit {
75 #[doc = "Construct a new `UdpMessageEventInit`."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"]
78 pub fn new() -> Self {
79 #[allow(unused_mut)]
80 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
81 ret
82 }
83 #[deprecated = "Use `set_bubbles()` instead."]
84 pub fn bubbles(&mut self, val: bool) -> &mut Self {
85 self.set_bubbles(val);
86 self
87 }
88 #[deprecated = "Use `set_cancelable()` instead."]
89 pub fn cancelable(&mut self, val: bool) -> &mut Self {
90 self.set_cancelable(val);
91 self
92 }
93 #[deprecated = "Use `set_composed()` instead."]
94 pub fn composed(&mut self, val: bool) -> &mut Self {
95 self.set_composed(val);
96 self
97 }
98 #[deprecated = "Use `set_data()` instead."]
99 pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
100 self.set_data(val);
101 self
102 }
103 #[deprecated = "Use `set_remote_address()` instead."]
104 pub fn remote_address(&mut self, val: &str) -> &mut Self {
105 self.set_remote_address(val);
106 self
107 }
108 #[deprecated = "Use `set_remote_port()` instead."]
109 pub fn remote_port(&mut self, val: u16) -> &mut Self {
110 self.set_remote_port(val);
111 self
112 }
113}
114impl Default for UdpMessageEventInit {
115 fn default() -> Self {
116 Self::new()
117 }
118}