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

Function run_android_action

packages/server/src/api/routes.rs:5461–5472  ·  view source on GitHub ↗
(state: AppState, action: F)

Source from the content-addressed store, hash-verified

5459}
5460
5461async fn run_android_action<F, T>(state: AppState, action: F) -> Result<T, AppError>
5462where
5463 F: FnOnce(AndroidBridge) -> Result<T, AppError> + Send + 'static,
5464 T: Send + 'static,
5465{
5466 let android = state.android.clone();
5467 task::spawn_blocking(move || action(android))
5468 .await
5469 .map_err(|error| {
5470 AppError::internal(format!("Failed to join Android bridge task: {error}"))
5471 })?
5472}
5473
5474async fn all_device_values(state: AppState, force_refresh: bool) -> Result<Vec<Value>, AppError> {
5475 let ios = list_simulators_cached(state.clone(), force_refresh).await?;

Callers 15

perform_tap_payloadFunction · 0.85
perform_back_payloadFunction · 0.85
perform_scroll_inputFunction · 0.85
run_batch_stepFunction · 0.85
simulator_create_optionsFunction · 0.85
create_simulatorFunction · 0.85
simulator_stateFunction · 0.85
boot_android_deviceFunction · 0.85
shutdown_simulatorFunction · 0.85
erase_simulatorFunction · 0.85
install_app_pathFunction · 0.85
uninstall_appFunction · 0.85

Calls 1

cloneMethod · 0.65

Tested by

no test coverage detected