MCPcopy Create free account
hub / github.com/deviceplug/btleplug / read_descriptor

Method read_descriptor

src/corebluetooth/peripheral.rs:483–502  ·  view source on GitHub ↗
(&self, descriptor: &Descriptor)

Source from the content-addressed store, hash-verified

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
505impl From<Uuid> for PeripheralId {

Callers

nothing calls this directly

Calls 1

get_state_cloneMethod · 0.80

Tested by

no test coverage detected