#![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = BluetoothAdvertisingEventInit)] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `BluetoothAdvertisingEventInit` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothAdvertisingEventInit; #[cfg(web_sys_unstable_apis)] #[doc = "Get the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "bubbles")] pub fn get_bubbles(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "bubbles")] pub fn set_bubbles(this: &BluetoothAdvertisingEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "cancelable")] pub fn get_cancelable(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "cancelable")] pub fn set_cancelable(this: &BluetoothAdvertisingEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "composed")] pub fn get_composed(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "composed")] pub fn set_composed(this: &BluetoothAdvertisingEventInit, val: bool); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `appearance` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "appearance")] pub fn get_appearance(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `appearance` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "appearance")] pub fn set_appearance(this: &BluetoothAdvertisingEventInit, val: u16); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] #[doc = "Get the `device` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "device")] pub fn get_device(this: &BluetoothAdvertisingEventInit) -> BluetoothDevice; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] #[doc = "Change the `device` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "device")] pub fn set_device(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] #[doc = "Get the `manufacturerData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothManufacturerDataMap`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "manufacturerData")] pub fn get_manufacturer_data( this: &BluetoothAdvertisingEventInit, ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] #[doc = "Change the `manufacturerData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothManufacturerDataMap`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "manufacturerData")] pub fn set_manufacturer_data( this: &BluetoothAdvertisingEventInit, val: &BluetoothManufacturerDataMap, ); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "name")] pub fn get_name(this: &BluetoothAdvertisingEventInit) -> Option<::alloc::string::String>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "name")] pub fn set_name(this: &BluetoothAdvertisingEventInit, val: &str); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `rssi` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "rssi")] pub fn get_rssi(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `rssi` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "rssi")] pub fn set_rssi(this: &BluetoothAdvertisingEventInit, val: i8); #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] #[doc = "Get the `serviceData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothServiceDataMap`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "serviceData")] pub fn get_service_data( this: &BluetoothAdvertisingEventInit, ) -> Option; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] #[doc = "Change the `serviceData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothServiceDataMap`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "serviceData")] pub fn set_service_data(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `txPower` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "txPower")] pub fn get_tx_power(this: &BluetoothAdvertisingEventInit) -> Option; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `txPower` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "txPower")] pub fn set_tx_power(this: &BluetoothAdvertisingEventInit, val: i8); #[cfg(web_sys_unstable_apis)] #[doc = "Get the `uuids` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, getter = "uuids")] pub fn get_uuids(this: &BluetoothAdvertisingEventInit) -> Option<::js_sys::Array>; #[cfg(web_sys_unstable_apis)] #[doc = "Change the `uuids` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] #[wasm_bindgen(method, setter = "uuids")] pub fn set_uuids(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); } #[cfg(web_sys_unstable_apis)] impl BluetoothAdvertisingEventInit { #[cfg(feature = "BluetoothDevice")] #[doc = "Construct a new `BluetoothAdvertisingEventInit`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] #[doc = ""] #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn new(device: &BluetoothDevice) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.set_device(device); ret } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_bubbles()` instead."] pub fn bubbles(&mut self, val: bool) -> &mut Self { self.set_bubbles(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_cancelable()` instead."] pub fn cancelable(&mut self, val: bool) -> &mut Self { self.set_cancelable(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_composed()` instead."] pub fn composed(&mut self, val: bool) -> &mut Self { self.set_composed(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_appearance()` instead."] pub fn appearance(&mut self, val: u16) -> &mut Self { self.set_appearance(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothDevice")] #[deprecated = "Use `set_device()` instead."] pub fn device(&mut self, val: &BluetoothDevice) -> &mut Self { self.set_device(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothManufacturerDataMap")] #[deprecated = "Use `set_manufacturer_data()` instead."] pub fn manufacturer_data(&mut self, val: &BluetoothManufacturerDataMap) -> &mut Self { self.set_manufacturer_data(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_name()` instead."] pub fn name(&mut self, val: &str) -> &mut Self { self.set_name(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_rssi()` instead."] pub fn rssi(&mut self, val: i8) -> &mut Self { self.set_rssi(val); self } #[cfg(web_sys_unstable_apis)] #[cfg(feature = "BluetoothServiceDataMap")] #[deprecated = "Use `set_service_data()` instead."] pub fn service_data(&mut self, val: &BluetoothServiceDataMap) -> &mut Self { self.set_service_data(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_tx_power()` instead."] pub fn tx_power(&mut self, val: i8) -> &mut Self { self.set_tx_power(val); self } #[cfg(web_sys_unstable_apis)] #[deprecated = "Use `set_uuids()` instead."] pub fn uuids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { self.set_uuids(val); self } }