#[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
A new value is available for the manufacturer-specific advertisement data of the device.
Fields
ServiceData
New GATT service advertisement data is available for the device.
Fields
Services
The set of GATT services known for the device has changed.
Fields
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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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 for DeviceEvent
impl PartialEq for DeviceEvent
impl Eq for DeviceEvent
impl StructuralPartialEq for DeviceEvent
Auto Trait Implementations§
impl Freeze for DeviceEvent
impl RefUnwindSafe for DeviceEvent
impl Send for DeviceEvent
impl Sync for DeviceEvent
impl Unpin for DeviceEvent
impl UnwindSafe for DeviceEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more