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
Fields
connected: bool
The device has connected or disconnected.
Rssi
Fields
rssi: i16
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
sourceimpl Clone for DeviceEvent
impl Clone for DeviceEvent
sourcefn clone(&self) -> DeviceEvent
fn clone(&self) -> DeviceEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DeviceEvent
impl Debug for DeviceEvent
sourceimpl PartialEq<DeviceEvent> for DeviceEvent
impl PartialEq<DeviceEvent> for DeviceEvent
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &DeviceEvent) -> bool
fn ne(&self, other: &DeviceEvent) -> bool
This method tests for !=
.
impl Eq for DeviceEvent
impl StructuralEq for DeviceEvent
impl StructuralPartialEq for DeviceEvent
Auto Trait Implementations
impl RefUnwindSafe for DeviceEvent
impl Send for DeviceEvent
impl Sync for DeviceEvent
impl Unpin for DeviceEvent
impl UnwindSafe for DeviceEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more