(&self)
| 299 | } |
| 300 | |
| 301 | async fn disconnect(&self) -> Result<()> { |
| 302 | let fut = CoreBluetoothReplyFuture::default(); |
| 303 | self.shared |
| 304 | .message_sender |
| 305 | .to_owned() |
| 306 | .send(CoreBluetoothMessage::DisconnectDevice { |
| 307 | peripheral_uuid: self.shared.uuid, |
| 308 | future: fut.get_state_clone(), |
| 309 | }) |
| 310 | .await?; |
| 311 | match fut.await { |
| 312 | CoreBluetoothReply::Ok => { |
| 313 | self.shared |
| 314 | .emit_event(CentralEvent::DeviceDisconnected(self.shared.uuid.into())); |
| 315 | trace!("Device disconnected!"); |
| 316 | } |
| 317 | _ => error!("Shouldn't get anything but Ok!"), |
| 318 | } |
| 319 | Ok(()) |
| 320 | } |
| 321 | |
| 322 | async fn discover_services(&self) -> Result<()> { |
| 323 | let fut = CoreBluetoothReplyFuture::default(); |
nothing calls this directly
no test coverage detected