Skip to main content

web_sys/features/
gen_BluetoothAdvertisingEvent.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(
9        extends = "Event",
10        extends = "::js_sys::Object",
11        js_name = "BluetoothAdvertisingEvent",
12        typescript_type = "BluetoothAdvertisingEvent"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `BluetoothAdvertisingEvent` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`*"]
20    #[doc = ""]
21    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23    pub type BluetoothAdvertisingEvent;
24    #[cfg(web_sys_unstable_apis)]
25    #[cfg(feature = "BluetoothDevice")]
26    #[wasm_bindgen(
27        method,
28        getter,
29        js_class = "BluetoothAdvertisingEvent",
30        js_name = "device"
31    )]
32    #[doc = "Getter for the `device` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/device)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`, `BluetoothDevice`*"]
37    #[doc = ""]
38    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
40    pub fn device(this: &BluetoothAdvertisingEvent) -> BluetoothDevice;
41    #[cfg(web_sys_unstable_apis)]
42    #[wasm_bindgen(
43        method,
44        getter,
45        js_class = "BluetoothAdvertisingEvent",
46        js_name = "uuids"
47    )]
48    #[doc = "Getter for the `uuids` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/uuids)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`*"]
53    #[doc = ""]
54    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56    pub fn uuids(this: &BluetoothAdvertisingEvent) -> ::js_sys::Array<::js_sys::JsString>;
57    #[cfg(web_sys_unstable_apis)]
58    #[wasm_bindgen(
59        method,
60        getter,
61        js_class = "BluetoothAdvertisingEvent",
62        js_name = "name"
63    )]
64    #[doc = "Getter for the `name` field of this object."]
65    #[doc = ""]
66    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/name)"]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`*"]
69    #[doc = ""]
70    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72    pub fn name(this: &BluetoothAdvertisingEvent) -> Option<::alloc::string::String>;
73    #[cfg(web_sys_unstable_apis)]
74    #[wasm_bindgen(
75        method,
76        getter,
77        js_class = "BluetoothAdvertisingEvent",
78        js_name = "appearance"
79    )]
80    #[doc = "Getter for the `appearance` field of this object."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/appearance)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`*"]
85    #[doc = ""]
86    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
88    pub fn appearance(this: &BluetoothAdvertisingEvent) -> Option<u16>;
89    #[cfg(web_sys_unstable_apis)]
90    #[wasm_bindgen(
91        method,
92        getter,
93        js_class = "BluetoothAdvertisingEvent",
94        js_name = "txPower"
95    )]
96    #[doc = "Getter for the `txPower` field of this object."]
97    #[doc = ""]
98    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/txPower)"]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`*"]
101    #[doc = ""]
102    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
104    pub fn tx_power(this: &BluetoothAdvertisingEvent) -> Option<i8>;
105    #[cfg(web_sys_unstable_apis)]
106    #[wasm_bindgen(
107        method,
108        getter,
109        js_class = "BluetoothAdvertisingEvent",
110        js_name = "rssi"
111    )]
112    #[doc = "Getter for the `rssi` field of this object."]
113    #[doc = ""]
114    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/rssi)"]
115    #[doc = ""]
116    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`*"]
117    #[doc = ""]
118    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
119    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
120    pub fn rssi(this: &BluetoothAdvertisingEvent) -> Option<i8>;
121    #[cfg(web_sys_unstable_apis)]
122    #[cfg(feature = "BluetoothManufacturerDataMap")]
123    #[wasm_bindgen(
124        method,
125        getter,
126        js_class = "BluetoothAdvertisingEvent",
127        js_name = "manufacturerData"
128    )]
129    #[doc = "Getter for the `manufacturerData` field of this object."]
130    #[doc = ""]
131    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/manufacturerData)"]
132    #[doc = ""]
133    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`, `BluetoothManufacturerDataMap`*"]
134    #[doc = ""]
135    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
136    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
137    pub fn manufacturer_data(this: &BluetoothAdvertisingEvent) -> BluetoothManufacturerDataMap;
138    #[cfg(web_sys_unstable_apis)]
139    #[cfg(feature = "BluetoothServiceDataMap")]
140    #[wasm_bindgen(
141        method,
142        getter,
143        js_class = "BluetoothAdvertisingEvent",
144        js_name = "serviceData"
145    )]
146    #[doc = "Getter for the `serviceData` field of this object."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/serviceData)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`, `BluetoothServiceDataMap`*"]
151    #[doc = ""]
152    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
154    pub fn service_data(this: &BluetoothAdvertisingEvent) -> BluetoothServiceDataMap;
155    #[cfg(web_sys_unstable_apis)]
156    #[cfg(feature = "BluetoothAdvertisingEventInit")]
157    #[wasm_bindgen(catch, constructor, js_class = "BluetoothAdvertisingEvent")]
158    #[doc = "The `new BluetoothAdvertisingEvent(..)` constructor, creating a new instance of `BluetoothAdvertisingEvent`."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BluetoothAdvertisingEvent/BluetoothAdvertisingEvent)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEvent`, `BluetoothAdvertisingEventInit`*"]
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 new(
167        type_: &str,
168        init: &BluetoothAdvertisingEventInit,
169    ) -> Result<BluetoothAdvertisingEvent, JsValue>;
170}