maxcountryman_web_sys/features/
gen_Bluetooth.rs

1#![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 = Bluetooth , typescript_type = "Bluetooth")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `Bluetooth` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 Bluetooth;
18    #[cfg(web_sys_unstable_apis)]
19    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onavailabilitychanged)]
20    #[doc = "Getter for the `onavailabilitychanged` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onavailabilitychanged)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 onavailabilitychanged(this: &Bluetooth) -> Option<::js_sys::Function>;
29    #[cfg(web_sys_unstable_apis)]
30    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onavailabilitychanged)]
31    #[doc = "Setter for the `onavailabilitychanged` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onavailabilitychanged)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 set_onavailabilitychanged(this: &Bluetooth, value: Option<&::js_sys::Function>);
40    #[cfg(web_sys_unstable_apis)]
41    #[cfg(feature = "BluetoothDevice")]
42    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = referringDevice)]
43    #[doc = "Getter for the `referringDevice` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/referringDevice)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `BluetoothDevice`*"]
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 referring_device(this: &Bluetooth) -> Option<BluetoothDevice>;
52    #[cfg(web_sys_unstable_apis)]
53    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onadvertisementreceived)]
54    #[doc = "Getter for the `onadvertisementreceived` field of this object."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onadvertisementreceived)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 onadvertisementreceived(this: &Bluetooth) -> Option<::js_sys::Function>;
63    #[cfg(web_sys_unstable_apis)]
64    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onadvertisementreceived)]
65    #[doc = "Setter for the `onadvertisementreceived` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onadvertisementreceived)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 set_onadvertisementreceived(this: &Bluetooth, value: Option<&::js_sys::Function>);
74    #[cfg(web_sys_unstable_apis)]
75    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = ongattserverdisconnected)]
76    #[doc = "Getter for the `ongattserverdisconnected` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/ongattserverdisconnected)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 ongattserverdisconnected(this: &Bluetooth) -> Option<::js_sys::Function>;
85    #[cfg(web_sys_unstable_apis)]
86    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = ongattserverdisconnected)]
87    #[doc = "Setter for the `ongattserverdisconnected` field of this object."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/ongattserverdisconnected)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 set_ongattserverdisconnected(this: &Bluetooth, value: Option<&::js_sys::Function>);
96    #[cfg(web_sys_unstable_apis)]
97    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = oncharacteristicvaluechanged)]
98    #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."]
99    #[doc = ""]
100    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/oncharacteristicvaluechanged)"]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 oncharacteristicvaluechanged(this: &Bluetooth) -> Option<::js_sys::Function>;
107    #[cfg(web_sys_unstable_apis)]
108    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = oncharacteristicvaluechanged)]
109    #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/oncharacteristicvaluechanged)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 set_oncharacteristicvaluechanged(this: &Bluetooth, value: Option<&::js_sys::Function>);
118    #[cfg(web_sys_unstable_apis)]
119    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onserviceadded)]
120    #[doc = "Getter for the `onserviceadded` field of this object."]
121    #[doc = ""]
122    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceadded)"]
123    #[doc = ""]
124    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
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 onserviceadded(this: &Bluetooth) -> Option<::js_sys::Function>;
129    #[cfg(web_sys_unstable_apis)]
130    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onserviceadded)]
131    #[doc = "Setter for the `onserviceadded` field of this object."]
132    #[doc = ""]
133    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceadded)"]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
136    #[doc = ""]
137    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
138    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
139    pub fn set_onserviceadded(this: &Bluetooth, value: Option<&::js_sys::Function>);
140    #[cfg(web_sys_unstable_apis)]
141    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onservicechanged)]
142    #[doc = "Getter for the `onservicechanged` field of this object."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onservicechanged)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
147    #[doc = ""]
148    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
149    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
150    pub fn onservicechanged(this: &Bluetooth) -> Option<::js_sys::Function>;
151    #[cfg(web_sys_unstable_apis)]
152    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onservicechanged)]
153    #[doc = "Setter for the `onservicechanged` field of this object."]
154    #[doc = ""]
155    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onservicechanged)"]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
158    #[doc = ""]
159    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
160    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
161    pub fn set_onservicechanged(this: &Bluetooth, value: Option<&::js_sys::Function>);
162    #[cfg(web_sys_unstable_apis)]
163    # [wasm_bindgen (structural , method , getter , js_class = "Bluetooth" , js_name = onserviceremoved)]
164    #[doc = "Getter for the `onserviceremoved` field of this object."]
165    #[doc = ""]
166    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceremoved)"]
167    #[doc = ""]
168    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
169    #[doc = ""]
170    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
171    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
172    pub fn onserviceremoved(this: &Bluetooth) -> Option<::js_sys::Function>;
173    #[cfg(web_sys_unstable_apis)]
174    # [wasm_bindgen (structural , method , setter , js_class = "Bluetooth" , js_name = onserviceremoved)]
175    #[doc = "Setter for the `onserviceremoved` field of this object."]
176    #[doc = ""]
177    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/onserviceremoved)"]
178    #[doc = ""]
179    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
180    #[doc = ""]
181    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
182    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
183    pub fn set_onserviceremoved(this: &Bluetooth, value: Option<&::js_sys::Function>);
184    #[cfg(web_sys_unstable_apis)]
185    # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = getAvailability)]
186    #[doc = "The `getAvailability()` method."]
187    #[doc = ""]
188    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getAvailability)"]
189    #[doc = ""]
190    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
191    #[doc = ""]
192    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
193    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
194    pub fn get_availability(this: &Bluetooth) -> ::js_sys::Promise;
195    #[cfg(web_sys_unstable_apis)]
196    # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = getDevices)]
197    #[doc = "The `getDevices()` method."]
198    #[doc = ""]
199    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getDevices)"]
200    #[doc = ""]
201    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`*"]
202    #[doc = ""]
203    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
204    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
205    pub fn get_devices(this: &Bluetooth) -> ::js_sys::Promise;
206    #[cfg(web_sys_unstable_apis)]
207    #[cfg(feature = "RequestDeviceOptions")]
208    # [wasm_bindgen (method , structural , js_class = "Bluetooth" , js_name = requestDevice)]
209    #[doc = "The `requestDevice()` method."]
210    #[doc = ""]
211    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice)"]
212    #[doc = ""]
213    #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `RequestDeviceOptions`*"]
214    #[doc = ""]
215    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
216    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
217    pub fn request_device(this: &Bluetooth, options: &RequestDeviceOptions) -> ::js_sys::Promise;
218}