pub enum Event {
AdapterChanged {
powered: bool,
present: bool,
},
DeviceSeen {
path: Path,
properties: HashMap<String, Value>,
},
DeviceRemoved {
path: Path,
},
Connected {
path: Path,
},
Disconnected {
path: Path,
},
ServicesResolved {
path: Path,
},
CharacteristicValue {
path: Path,
value: Vec<u8>,
},
ServicesChanged {
path: Path,
},
Disconnected_,
}Expand description
What the tree tells us happened.
Variants§
AdapterChanged
The adapter’s Powered changed, or it appeared/vanished.
DeviceSeen
A device object appeared, or re-advertised with new properties.
DeviceRemoved
A device object vanished — BlueZ removes stale ones after a scan.
Connected
Connected became true.
Disconnected
Connected became false.
ServicesResolved
ServicesResolved became true: the GATT tree is now populated.
CharacteristicValue
A characteristic’s Value changed — a notification or indication.
ServicesChanged
A GattService1 object appeared under or vanished from a device.
This is the tree’s account of the Service Changed indication. BlueZ
subscribes to that characteristic itself and re-discovers, so what
reaches us is the result rather than the indication: services arriving
and leaving under the device’s path. path is the device, not the
service.
Disconnected_
The whole bus went away.