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

Function simulator_create_options

packages/server/src/api/routes.rs:1744–1760  ·  view source on GitHub ↗
(State(state): State<AppState>)

Source from the content-addressed store, hash-verified

1742}
1743
1744async fn simulator_create_options(State(state): State<AppState>) -> Result<Json<Value>, AppError> {
1745 let mut options =
1746 run_bridge_action(state.clone(), |bridge| bridge.simulator_creation_options()).await?;
1747 let android_options =
1748 match run_android_action(state, |android| android.creation_options()).await {
1749 Ok(options) => options,
1750 Err(error) => json_value!({
1751 "deviceTypes": [],
1752 "systemImages": [],
1753 "unavailableReason": error.to_string(),
1754 }),
1755 };
1756 if let Some(map) = options.as_object_mut() {
1757 map.insert("android".to_owned(), android_options);
1758 }
1759 Ok(json(options))
1760}
1761
1762async fn create_simulator(
1763 State(state): State<AppState>,

Callers

nothing calls this directly

Calls 7

run_bridge_actionFunction · 0.85
run_android_actionFunction · 0.85
jsonFunction · 0.85
creation_optionsMethod · 0.80
insertMethod · 0.80
cloneMethod · 0.65

Tested by

no test coverage detected