maxcountryman_web_sys/features/
gen_BluetoothDevice.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[cfg(web_sys_unstable_apis)]
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = BluetoothDevice , typescript_type = "BluetoothDevice")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `BluetoothDevice` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
14 #[doc = ""]
15 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17 pub type BluetoothDevice;
18 #[cfg(web_sys_unstable_apis)]
19 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = id)]
20 #[doc = "Getter for the `id` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/id)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
25 #[doc = ""]
26 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
28 pub fn id(this: &BluetoothDevice) -> String;
29 #[cfg(web_sys_unstable_apis)]
30 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = name)]
31 #[doc = "Getter for the `name` field of this object."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/name)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
36 #[doc = ""]
37 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
38 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
39 pub fn name(this: &BluetoothDevice) -> Option<String>;
40 #[cfg(web_sys_unstable_apis)]
41 #[cfg(feature = "BluetoothRemoteGattServer")]
42 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = gatt)]
43 #[doc = "Getter for the `gatt` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/gatt)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `BluetoothRemoteGattServer`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 pub fn gatt(this: &BluetoothDevice) -> Option<BluetoothRemoteGattServer>;
52 #[cfg(web_sys_unstable_apis)]
53 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = watchingAdvertisements)]
54 #[doc = "Getter for the `watchingAdvertisements` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/watchingAdvertisements)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 pub fn watching_advertisements(this: &BluetoothDevice) -> bool;
63 #[cfg(web_sys_unstable_apis)]
64 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onadvertisementreceived)]
65 #[doc = "Getter for the `onadvertisementreceived` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onadvertisementreceived)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
70 #[doc = ""]
71 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
73 pub fn onadvertisementreceived(this: &BluetoothDevice) -> Option<::js_sys::Function>;
74 #[cfg(web_sys_unstable_apis)]
75 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onadvertisementreceived)]
76 #[doc = "Setter for the `onadvertisementreceived` field of this object."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onadvertisementreceived)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 pub fn set_onadvertisementreceived(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
85 #[cfg(web_sys_unstable_apis)]
86 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = ongattserverdisconnected)]
87 #[doc = "Getter for the `ongattserverdisconnected` field of this object."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/ongattserverdisconnected)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 pub fn ongattserverdisconnected(this: &BluetoothDevice) -> Option<::js_sys::Function>;
96 #[cfg(web_sys_unstable_apis)]
97 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = ongattserverdisconnected)]
98 #[doc = "Setter for the `ongattserverdisconnected` field of this object."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/ongattserverdisconnected)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
103 #[doc = ""]
104 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
106 pub fn set_ongattserverdisconnected(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
107 #[cfg(web_sys_unstable_apis)]
108 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = oncharacteristicvaluechanged)]
109 #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."]
110 #[doc = ""]
111 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/oncharacteristicvaluechanged)"]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
114 #[doc = ""]
115 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
116 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
117 pub fn oncharacteristicvaluechanged(this: &BluetoothDevice) -> Option<::js_sys::Function>;
118 #[cfg(web_sys_unstable_apis)]
119 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = oncharacteristicvaluechanged)]
120 #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."]
121 #[doc = ""]
122 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/oncharacteristicvaluechanged)"]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
125 #[doc = ""]
126 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
127 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
128 pub fn set_oncharacteristicvaluechanged(
129 this: &BluetoothDevice,
130 value: Option<&::js_sys::Function>,
131 );
132 #[cfg(web_sys_unstable_apis)]
133 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onserviceadded)]
134 #[doc = "Getter for the `onserviceadded` field of this object."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceadded)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 pub fn onserviceadded(this: &BluetoothDevice) -> Option<::js_sys::Function>;
143 #[cfg(web_sys_unstable_apis)]
144 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onserviceadded)]
145 #[doc = "Setter for the `onserviceadded` field of this object."]
146 #[doc = ""]
147 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceadded)"]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
150 #[doc = ""]
151 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
152 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
153 pub fn set_onserviceadded(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
154 #[cfg(web_sys_unstable_apis)]
155 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onservicechanged)]
156 #[doc = "Getter for the `onservicechanged` field of this object."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onservicechanged)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
161 #[doc = ""]
162 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
163 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
164 pub fn onservicechanged(this: &BluetoothDevice) -> Option<::js_sys::Function>;
165 #[cfg(web_sys_unstable_apis)]
166 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onservicechanged)]
167 #[doc = "Setter for the `onservicechanged` field of this object."]
168 #[doc = ""]
169 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onservicechanged)"]
170 #[doc = ""]
171 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
172 #[doc = ""]
173 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
174 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
175 pub fn set_onservicechanged(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
176 #[cfg(web_sys_unstable_apis)]
177 # [wasm_bindgen (structural , method , getter , js_class = "BluetoothDevice" , js_name = onserviceremoved)]
178 #[doc = "Getter for the `onserviceremoved` field of this object."]
179 #[doc = ""]
180 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceremoved)"]
181 #[doc = ""]
182 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
183 #[doc = ""]
184 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
185 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
186 pub fn onserviceremoved(this: &BluetoothDevice) -> Option<::js_sys::Function>;
187 #[cfg(web_sys_unstable_apis)]
188 # [wasm_bindgen (structural , method , setter , js_class = "BluetoothDevice" , js_name = onserviceremoved)]
189 #[doc = "Setter for the `onserviceremoved` field of this object."]
190 #[doc = ""]
191 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/onserviceremoved)"]
192 #[doc = ""]
193 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
194 #[doc = ""]
195 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
196 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
197 pub fn set_onserviceremoved(this: &BluetoothDevice, value: Option<&::js_sys::Function>);
198 #[cfg(web_sys_unstable_apis)]
199 # [wasm_bindgen (method , structural , js_class = "BluetoothDevice" , js_name = watchAdvertisements)]
200 #[doc = "The `watchAdvertisements()` method."]
201 #[doc = ""]
202 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/watchAdvertisements)"]
203 #[doc = ""]
204 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`*"]
205 #[doc = ""]
206 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
207 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
208 pub fn watch_advertisements(this: &BluetoothDevice) -> ::js_sys::Promise;
209 #[cfg(web_sys_unstable_apis)]
210 #[cfg(feature = "WatchAdvertisementsOptions")]
211 # [wasm_bindgen (method , structural , js_class = "BluetoothDevice" , js_name = watchAdvertisements)]
212 #[doc = "The `watchAdvertisements()` method."]
213 #[doc = ""]
214 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice/watchAdvertisements)"]
215 #[doc = ""]
216 #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `WatchAdvertisementsOptions`*"]
217 #[doc = ""]
218 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
219 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
220 pub fn watch_advertisements_with_options(
221 this: &BluetoothDevice,
222 options: &WatchAdvertisementsOptions,
223 ) -> ::js_sys::Promise;
224}