MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / simulator_payload

Function simulator_payload

packages/server/src/api/routes.rs:5558–5568  ·  view source on GitHub ↗
(state: AppState, udid: String)

Source from the content-addressed store, hash-verified

5556}
5557
5558async fn simulator_payload(state: AppState, udid: String) -> Result<Json<Value>, AppError> {
5559 if android::is_android_id(&udid) {
5560 return android_simulator_payload(state, udid).await;
5561 }
5562 let enriched = all_device_values(state.clone(), true).await?;
5563 let simulator = enriched
5564 .into_iter()
5565 .find(|entry| entry.get("udid").and_then(Value::as_str) == Some(udid.as_str()))
5566 .ok_or_else(|| AppError::not_found(format!("Unknown simulator {udid}")))?;
5567 Ok(json(json_value!({ "simulator": simulator })))
5568}
5569
5570async fn accessibility_snapshot(
5571 state: AppState,

Callers 2

boot_simulatorFunction · 0.85
shutdown_simulatorFunction · 0.85

Calls 7

is_android_idFunction · 0.85
all_device_valuesFunction · 0.85
jsonFunction · 0.85
cloneMethod · 0.65
getMethod · 0.65
as_strMethod · 0.45

Tested by

no test coverage detected