Enum bluez_async::DeviceEvent[][src]

#[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,
}

Details of an event related to a Bluetooth device.

Variants (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.

Fields of Connected

connected: bool
RSSI

A new value is available for the RSSI of the device.

Fields of RSSI

rssi: i16
ManufacturerData

A new value is available for the manufacturer-specific advertisement data of the device.

Fields of ManufacturerData

manufacturer_data: HashMap<u16, Vec<u8>>

The manufacturer-specific advertisement data. The keys are ‘manufacturer IDs’.

ServiceData

New GATT service advertisement data is available for the device.

Fields of ServiceData

service_data: HashMap<Uuid, Vec<u8>>

The new GATT service data. This is a map from the service UUID to its data.

Services

The set of GATT services known for the device has changed.

Fields of Services

services: Vec<Uuid>

The new set of GATT service UUIDs from the device’s advertisement or service discovery.

ServicesResolved

Service discovery has completed.

Trait Implementations

impl Clone for DeviceEvent[src]

impl Debug for DeviceEvent[src]

impl Eq for DeviceEvent[src]

impl PartialEq<DeviceEvent> for DeviceEvent[src]

impl StructuralEq for DeviceEvent[src]

impl StructuralPartialEq for DeviceEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.