Like [`discover_services`](Peripheral::discover_services), but returns [`Error::TimedOut`](crate::Error::TimedOut) if discovery does not complete within the given duration.
(&self, timeout: Duration)
| 306 | /// [`Error::TimedOut`](crate::Error::TimedOut) if discovery does not complete within the |
| 307 | /// given duration. |
| 308 | async fn discover_services_with_timeout(&self, timeout: Duration) -> Result<()> { |
| 309 | tokio::time::timeout(timeout, self.discover_services()) |
| 310 | .await |
| 311 | .map_err(|_| crate::Error::TimedOut(timeout))? |
| 312 | } |
| 313 | |
| 314 | /// Write some data to the characteristic. Returns an error if the write couldn't be sent or (in |
| 315 | /// the case of a write-with-response) if the device returns an error. |
no test coverage detected