Function tauri::api::process::restart

source ·
pub fn restart(env: &Env)
Expand description

Restarts the currently running binary.

See current_binary for platform specific behavior, and tauri_utils::platform::current_exe for possible security implications.

Examples

use tauri::{api::process::restart, Env, Manager};

tauri::Builder::default()
  .setup(|app| {
    restart(&app.env());
    Ok(())
  });
Examples found in repository?
src/app.rs (line 492)
490
491
492
493
  pub fn restart(&self) {
    self.cleanup_before_exit();
    crate::api::process::restart(&self.env());
  }