(&self, descriptor: &Descriptor)
| 481 | } |
| 482 | |
| 483 | async fn read_descriptor(&self, descriptor: &Descriptor) -> Result<Vec<u8>> { |
| 484 | let fut = CoreBluetoothReplyFuture::default(); |
| 485 | self.shared |
| 486 | .message_sender |
| 487 | .to_owned() |
| 488 | .send(CoreBluetoothMessage::ReadDescriptorValue { |
| 489 | peripheral_uuid: self.shared.uuid, |
| 490 | service_uuid: descriptor.service_uuid, |
| 491 | characteristic_uuid: descriptor.characteristic_uuid, |
| 492 | descriptor_uuid: descriptor.uuid, |
| 493 | future: fut.get_state_clone(), |
| 494 | }) |
| 495 | .await?; |
| 496 | match fut.await { |
| 497 | CoreBluetoothReply::ReadResult(chars) => Ok(chars), |
| 498 | _ => { |
| 499 | panic!("Shouldn't get anything but read result!"); |
| 500 | } |
| 501 | } |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | impl From<Uuid> for PeripheralId { |
nothing calls this directly
no test coverage detected