Enum bluez_async::DeviceEvent
source · #[non_exhaustive]
pub enum DeviceEvent {
Discovered,
Connected {
connected: bool,
},
Rssi {
rssi: i16,
},
ManufacturerData {
manufacturer_data: HashMap<u16, Vec<u8>>,
},
ServiceData {
service_data: HashMap<Uuid, Vec<u8>>,
},
Services {
services: Vec<Uuid>,
},
ServicesResolved,
}
Expand description
Details of an event related to a Bluetooth device.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Discovered
A new device has been discovered.
Connected
The device has connected or disconnected.
Rssi
A new value is available for the RSSI of the device.
ManufacturerData
Fields
A new value is available for the manufacturer-specific advertisement data of the device.
ServiceData
Fields
New GATT service advertisement data is available for the device.
Services
Fields
The set of GATT services known for the device has changed.
ServicesResolved
Service discovery has completed.
Trait Implementations§
source§impl Clone for DeviceEvent
impl Clone for DeviceEvent
source§fn clone(&self) -> DeviceEvent
fn clone(&self) -> DeviceEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeviceEvent
impl Debug for DeviceEvent
source§impl PartialEq<DeviceEvent> for DeviceEvent
impl PartialEq<DeviceEvent> for DeviceEvent
source§fn eq(&self, other: &DeviceEvent) -> bool
fn eq(&self, other: &DeviceEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.