Skip to main content

web_sys/features/
gen_BluetoothRemoteGattService.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = BluetoothRemoteGATTService , typescript_type = "BluetoothRemoteGATTService")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `BluetoothRemoteGattService` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
15    #[doc = ""]
16    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
18    pub type BluetoothRemoteGattService;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "BluetoothDevice")]
21    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = device)]
22    #[doc = "Getter for the `device` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/device)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `BluetoothDevice`, `BluetoothRemoteGattService`*"]
27    #[doc = ""]
28    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
30    pub fn device(this: &BluetoothRemoteGattService) -> BluetoothDevice;
31    #[cfg(web_sys_unstable_apis)]
32    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = uuid)]
33    #[doc = "Getter for the `uuid` field of this object."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/uuid)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
38    #[doc = ""]
39    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
41    pub fn uuid(this: &BluetoothRemoteGattService) -> ::alloc::string::String;
42    #[cfg(web_sys_unstable_apis)]
43    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = isPrimary)]
44    #[doc = "Getter for the `isPrimary` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/isPrimary)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
49    #[doc = ""]
50    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52    pub fn is_primary(this: &BluetoothRemoteGattService) -> bool;
53    #[cfg(web_sys_unstable_apis)]
54    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = oncharacteristicvaluechanged)]
55    #[doc = "Getter for the `oncharacteristicvaluechanged` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/oncharacteristicvaluechanged)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    pub fn oncharacteristicvaluechanged(
64        this: &BluetoothRemoteGattService,
65    ) -> Option<::js_sys::Function>;
66    #[cfg(web_sys_unstable_apis)]
67    # [wasm_bindgen (structural , method , setter , js_class = "BluetoothRemoteGATTService" , js_name = oncharacteristicvaluechanged)]
68    #[doc = "Setter for the `oncharacteristicvaluechanged` field of this object."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/oncharacteristicvaluechanged)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
73    #[doc = ""]
74    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
76    pub fn set_oncharacteristicvaluechanged(
77        this: &BluetoothRemoteGattService,
78        value: Option<&::js_sys::Function>,
79    );
80    #[cfg(web_sys_unstable_apis)]
81    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = onserviceadded)]
82    #[doc = "Getter for the `onserviceadded` field of this object."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceadded)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
87    #[doc = ""]
88    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
89    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
90    pub fn onserviceadded(this: &BluetoothRemoteGattService) -> Option<::js_sys::Function>;
91    #[cfg(web_sys_unstable_apis)]
92    # [wasm_bindgen (structural , method , setter , js_class = "BluetoothRemoteGATTService" , js_name = onserviceadded)]
93    #[doc = "Setter for the `onserviceadded` field of this object."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceadded)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
98    #[doc = ""]
99    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
101    pub fn set_onserviceadded(
102        this: &BluetoothRemoteGattService,
103        value: Option<&::js_sys::Function>,
104    );
105    #[cfg(web_sys_unstable_apis)]
106    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = onservicechanged)]
107    #[doc = "Getter for the `onservicechanged` field of this object."]
108    #[doc = ""]
109    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onservicechanged)"]
110    #[doc = ""]
111    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
112    #[doc = ""]
113    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
114    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
115    pub fn onservicechanged(this: &BluetoothRemoteGattService) -> Option<::js_sys::Function>;
116    #[cfg(web_sys_unstable_apis)]
117    # [wasm_bindgen (structural , method , setter , js_class = "BluetoothRemoteGATTService" , js_name = onservicechanged)]
118    #[doc = "Setter for the `onservicechanged` field of this object."]
119    #[doc = ""]
120    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onservicechanged)"]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
123    #[doc = ""]
124    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
125    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
126    pub fn set_onservicechanged(
127        this: &BluetoothRemoteGattService,
128        value: Option<&::js_sys::Function>,
129    );
130    #[cfg(web_sys_unstable_apis)]
131    # [wasm_bindgen (structural , method , getter , js_class = "BluetoothRemoteGATTService" , js_name = onserviceremoved)]
132    #[doc = "Getter for the `onserviceremoved` field of this object."]
133    #[doc = ""]
134    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceremoved)"]
135    #[doc = ""]
136    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
137    #[doc = ""]
138    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
139    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
140    pub fn onserviceremoved(this: &BluetoothRemoteGattService) -> Option<::js_sys::Function>;
141    #[cfg(web_sys_unstable_apis)]
142    # [wasm_bindgen (structural , method , setter , js_class = "BluetoothRemoteGATTService" , js_name = onserviceremoved)]
143    #[doc = "Setter for the `onserviceremoved` field of this object."]
144    #[doc = ""]
145    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/onserviceremoved)"]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
148    #[doc = ""]
149    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
150    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
151    pub fn set_onserviceremoved(
152        this: &BluetoothRemoteGattService,
153        value: Option<&::js_sys::Function>,
154    );
155    #[cfg(web_sys_unstable_apis)]
156    #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
157    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getCharacteristic)]
158    #[doc = "The `getCharacteristic()` method."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristic)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
163    #[doc = ""]
164    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
165    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
166    pub fn get_characteristic_with_str(
167        this: &BluetoothRemoteGattService,
168        characteristic: &str,
169    ) -> ::js_sys::Promise<BluetoothRemoteGattCharacteristic>;
170    #[cfg(web_sys_unstable_apis)]
171    #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
172    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getCharacteristic)]
173    #[doc = "The `getCharacteristic()` method."]
174    #[doc = ""]
175    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristic)"]
176    #[doc = ""]
177    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
178    #[doc = ""]
179    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
180    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
181    pub fn get_characteristic_with_u32(
182        this: &BluetoothRemoteGattService,
183        characteristic: u32,
184    ) -> ::js_sys::Promise<BluetoothRemoteGattCharacteristic>;
185    #[cfg(web_sys_unstable_apis)]
186    #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
187    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getCharacteristics)]
188    #[doc = "The `getCharacteristics()` method."]
189    #[doc = ""]
190    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristics)"]
191    #[doc = ""]
192    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
193    #[doc = ""]
194    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
195    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
196    pub fn get_characteristics(
197        this: &BluetoothRemoteGattService,
198    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattCharacteristic>>;
199    #[cfg(web_sys_unstable_apis)]
200    #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
201    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getCharacteristics)]
202    #[doc = "The `getCharacteristics()` method."]
203    #[doc = ""]
204    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristics)"]
205    #[doc = ""]
206    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
207    #[doc = ""]
208    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
209    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
210    pub fn get_characteristics_with_str(
211        this: &BluetoothRemoteGattService,
212        characteristic: &str,
213    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattCharacteristic>>;
214    #[cfg(web_sys_unstable_apis)]
215    #[cfg(feature = "BluetoothRemoteGattCharacteristic")]
216    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getCharacteristics)]
217    #[doc = "The `getCharacteristics()` method."]
218    #[doc = ""]
219    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getCharacteristics)"]
220    #[doc = ""]
221    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattCharacteristic`, `BluetoothRemoteGattService`*"]
222    #[doc = ""]
223    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
224    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
225    pub fn get_characteristics_with_u32(
226        this: &BluetoothRemoteGattService,
227        characteristic: u32,
228    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattCharacteristic>>;
229    #[cfg(web_sys_unstable_apis)]
230    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getIncludedService)]
231    #[doc = "The `getIncludedService()` method."]
232    #[doc = ""]
233    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedService)"]
234    #[doc = ""]
235    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
236    #[doc = ""]
237    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
238    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
239    pub fn get_included_service_with_str(
240        this: &BluetoothRemoteGattService,
241        service: &str,
242    ) -> ::js_sys::Promise<BluetoothRemoteGattService>;
243    #[cfg(web_sys_unstable_apis)]
244    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getIncludedService)]
245    #[doc = "The `getIncludedService()` method."]
246    #[doc = ""]
247    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedService)"]
248    #[doc = ""]
249    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
250    #[doc = ""]
251    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
252    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
253    pub fn get_included_service_with_u32(
254        this: &BluetoothRemoteGattService,
255        service: u32,
256    ) -> ::js_sys::Promise<BluetoothRemoteGattService>;
257    #[cfg(web_sys_unstable_apis)]
258    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getIncludedServices)]
259    #[doc = "The `getIncludedServices()` method."]
260    #[doc = ""]
261    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedServices)"]
262    #[doc = ""]
263    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
264    #[doc = ""]
265    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
266    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
267    pub fn get_included_services(
268        this: &BluetoothRemoteGattService,
269    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
270    #[cfg(web_sys_unstable_apis)]
271    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getIncludedServices)]
272    #[doc = "The `getIncludedServices()` method."]
273    #[doc = ""]
274    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedServices)"]
275    #[doc = ""]
276    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
277    #[doc = ""]
278    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
279    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
280    pub fn get_included_services_with_str(
281        this: &BluetoothRemoteGattService,
282        service: &str,
283    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
284    #[cfg(web_sys_unstable_apis)]
285    # [wasm_bindgen (method , structural , js_class = "BluetoothRemoteGATTService" , js_name = getIncludedServices)]
286    #[doc = "The `getIncludedServices()` method."]
287    #[doc = ""]
288    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/getIncludedServices)"]
289    #[doc = ""]
290    #[doc = "*This API requires the following crate features to be activated: `BluetoothRemoteGattService`*"]
291    #[doc = ""]
292    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
293    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
294    pub fn get_included_services_with_u32(
295        this: &BluetoothRemoteGattService,
296        service: u32,
297    ) -> ::js_sys::Promise<::js_sys::Array<BluetoothRemoteGattService>>;
298}