mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-31 19:32:13 +08:00
16 lines
445 B
Rust
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()
|
|
}
|