Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
Quit.rs

1//! `nativeHost:quit` - save state and gracefully exit the process.
2//! VS Code calls this from `ILifecycleMainService.quit()` on Cmd+Q,
3//! File → Quit, and the "Quit" tray item.
4
5use serde_json::Value;
6use tauri::AppHandle;
7
8use crate::dev_log;
9
10pub async fn Fn(ApplicationHandle:AppHandle, _Arguments:Vec<Value>) -> Result<Value, String> {
11	dev_log!("lifecycle", "nativeHost:quit - exiting cleanly");
12
13	ApplicationHandle.exit(0);
14
15	Ok(Value::Null)
16}