(
&self,
process_identifier: i64,
method: &str,
params: Value,
wait: Duration,
)
| 268 | } |
| 269 | |
| 270 | pub async fn query_with_timeout( |
| 271 | &self, |
| 272 | process_identifier: i64, |
| 273 | method: &str, |
| 274 | params: Value, |
| 275 | wait: Duration, |
| 276 | ) -> Result<Value, String> { |
| 277 | let agent = self |
| 278 | .inner |
| 279 | .lock() |
| 280 | .await |
| 281 | .agents |
| 282 | .get(&process_identifier) |
| 283 | .cloned() |
| 284 | .ok_or_else(|| { |
| 285 | format!("NativeScript inspector for process {process_identifier} is not connected.") |
| 286 | })?; |
| 287 | agent.query(method, params, wait).await |
| 288 | } |
| 289 | |
| 290 | pub async fn poll( |
| 291 | &self, |
no test coverage detected