(&self, characteristic: &Characteristic)
| 382 | } |
| 383 | |
| 384 | async fn read(&self, characteristic: &Characteristic) -> Result<Vec<u8>> { |
| 385 | let future = self.with_obj(|env, obj| { |
| 386 | let uuid = JUuid::new(env, characteristic.uuid)?; |
| 387 | JSendFuture::try_from(obj.read(uuid)?) |
| 388 | })?; |
| 389 | let result_ref = future.await?; |
| 390 | self.with_obj(|env, _obj| { |
| 391 | let result = JPollResult::from_env(env, result_ref.as_obj())?; |
| 392 | let bytes = get_poll_result(env, result)?; |
| 393 | Ok(byte_array_to_vec(env, bytes.into_inner())?) |
| 394 | }) |
| 395 | } |
| 396 | |
| 397 | async fn subscribe(&self, characteristic: &Characteristic) -> Result<()> { |
| 398 | self.set_characteristic_notification(characteristic, true) |
nothing calls this directly
no test coverage detected