(&self, characteristic: &Characteristic)
| 590 | } |
| 591 | |
| 592 | async fn read(&self, characteristic: &Characteristic) -> Result<Vec<u8>> { |
| 593 | let ble_service = &*self |
| 594 | .shared |
| 595 | .ble_services |
| 596 | .get(&characteristic.service_uuid) |
| 597 | .ok_or_else(|| Error::NotSupported("Service not found for read".into()))?; |
| 598 | let ble_characteristic = ble_service |
| 599 | .characteristics |
| 600 | .get(&characteristic.uuid) |
| 601 | .ok_or_else(|| Error::NotSupported("Characteristic not found for read".into()))?; |
| 602 | ble_characteristic.read_value().await |
| 603 | } |
| 604 | |
| 605 | async fn notifications(&self) -> Result<Pin<Box<dyn Stream<Item = ValueNotification> + Send>>> { |
| 606 | let receiver = self.shared.notifications_channel.subscribe(); |
no test coverage detected