MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / fetch_devtools_target_list

Function fetch_devtools_target_list

packages/server/src/devtools.rs:429–441  ·  view source on GitHub ↗
(port: u16)

Source from the content-addressed store, hash-verified

427}
428
429async fn fetch_devtools_target_list(port: u16) -> Result<Value, String> {
430 let mut errors = Vec::new();
431 for host in DEVTOOLS_DISCOVERY_HOSTS {
432 match fetch_devtools_json(host, port, "/json/list").await {
433 Ok(value) => return Ok(value),
434 Err(list_error) => match fetch_devtools_json(host, port, "/json").await {
435 Ok(value) => return Ok(value),
436 Err(json_error) => errors.push(format!("{list_error}; {json_error}")),
437 },
438 }
439 }
440 Err(errors.join("; "))
441}
442
443async fn fetch_devtools_json(host: &str, port: u16, path: &str) -> Result<Value, String> {
444 let address = format!("{host}:{port}");

Calls 1

fetch_devtools_jsonFunction · 0.85

Tested by

no test coverage detected