(&self, descriptor: &Descriptor)
| 467 | } |
| 468 | |
| 469 | async fn read_descriptor(&self, descriptor: &Descriptor) -> Result<Vec<u8>> { |
| 470 | let future = self.with_obj(|env, obj| { |
| 471 | let characteristic = JUuid::new(env, descriptor.characteristic_uuid)?; |
| 472 | let uuid = JUuid::new(env, descriptor.uuid)?; |
| 473 | JSendFuture::try_from(obj.read_descriptor(characteristic, uuid)?) |
| 474 | })?; |
| 475 | let result_ref = future.await?; |
| 476 | self.with_obj(|env, _obj| { |
| 477 | let result = JPollResult::from_env(env, result_ref.as_obj())?; |
| 478 | let bytes = get_poll_result(env, result)?; |
| 479 | Ok(byte_array_to_vec(env, bytes.into_inner())?) |
| 480 | }) |
| 481 | } |
| 482 | |
| 483 | async fn connection_parameters(&self) -> Result<Option<ConnectionParameters>> { |
| 484 | self.with_obj(|_env, obj| { |
nothing calls this directly
no test coverage detected