(
state: State<'_, AppState>,
startup_trace: State<'_, DesktopStartupTrace>,
)
| 1946 | |
| 1947 | #[tauri::command] |
| 1948 | pub async fn get_recent_workspaces( |
| 1949 | state: State<'_, AppState>, |
| 1950 | startup_trace: State<'_, DesktopStartupTrace>, |
| 1951 | ) -> Result<Vec<WorkspaceInfoDto>, String> { |
| 1952 | let trace_started = Instant::now(); |
| 1953 | let workspace_service = &state.workspace_service; |
| 1954 | let result = Ok(workspace_service |
| 1955 | .get_recent_workspaces() |
| 1956 | .await |
| 1957 | .into_iter() |
| 1958 | .map(|info| WorkspaceInfoDto::from_workspace_info(&info)) |
| 1959 | .collect()); |
| 1960 | startup_trace.record_tauri_command_elapsed("get_recent_workspaces", None, trace_started); |
| 1961 | result |
| 1962 | } |
| 1963 | |
| 1964 | async fn collect_workspace_state_snapshot(state: &State<'_, AppState>) -> WorkspaceStateSnapshot { |
| 1965 | let workspace_service = &state.workspace_service; |
nothing calls this directly
no test coverage detected