Files
clash-verge-rev/src-tauri/src/cmd/system.rs
T
2026-08-19 07:27:43 +08:00

16 lines
445 B
Rust

use crate::core::{
notification::{self, PendingFailure},
runstate::{RUN_STATE, RunStateView},
};
/// Returns one coherent core/service snapshot instead of independently refreshed state.
#[tauri::command]
pub async fn get_runtime_state() -> Result<RunStateView, String> {
Ok(RUN_STATE.settled().await.to_view())
}
#[tauri::command]
pub async fn get_pending_failures() -> Vec<PendingFailure> {
notification::pending_failures()
}