Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
Quit.rs

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