(
state: State<'_, AppState>,
startup_trace: State<'_, DesktopStartupTrace>,
)
| 2255 | |
| 2256 | #[tauri::command] |
| 2257 | pub async fn get_opened_workspaces( |
| 2258 | state: State<'_, AppState>, |
| 2259 | startup_trace: State<'_, DesktopStartupTrace>, |
| 2260 | ) -> Result<Vec<WorkspaceInfoDto>, String> { |
| 2261 | let trace_started = Instant::now(); |
| 2262 | let workspace_service = &state.workspace_service; |
| 2263 | let result = Ok(workspace_service |
| 2264 | .get_opened_workspaces() |
| 2265 | .await |
| 2266 | .into_iter() |
| 2267 | .map(|info| WorkspaceInfoDto::from_workspace_info(&info)) |
| 2268 | .collect()); |
| 2269 | startup_trace.record_tauri_command_elapsed("get_opened_workspaces", None, trace_started); |
| 2270 | result |
| 2271 | } |
| 2272 | |
| 2273 | #[tauri::command] |
| 2274 | pub async fn scan_workspace_info( |
nothing calls this directly
no test coverage detected