pub struct Shell { /* private fields */ }Implementations§
Source§impl Shell
impl Shell
Sourcepub fn builder(app_id: &str) -> ShellBuilder
pub fn builder(app_id: &str) -> ShellBuilder
app_id: lowercase letters, digits and - (it names the single-instance service and the
LaunchAgent / registry entry), at most 40 characters.
Source§impl Shell
impl Shell
Sourcepub fn single_instance_plugin(
self,
on_second_instance: impl Fn(&AppHandle<Wry>, &[String], &str) + Send + Sync + 'static,
) -> TauriPlugin<Wry>
pub fn single_instance_plugin( self, on_second_instance: impl Fn(&AppHandle<Wry>, &[String], &str) + Send + Sync + 'static, ) -> TauriPlugin<Wry>
Install single-instance arbitration only. Add this plugin FIRST.
Only the builder’s app_id is used; arbitration is always enabled.
The callback receives forwarded argv & cwd and owns all second-launch behavior.
No script, navigation policy, window state, presence loop or ShellState is installed.
Keep using the app’s own invoke handler; handler! requires the full shell.
Sourcepub fn lifecycle_plugin(self) -> TauriPlugin<Wry>
pub fn lifecycle_plugin(self) -> TauriPlugin<Wry>
The shell’s lifecycle without its webview policy: single instance, close behaviour, tray,
menu, second-launch routing, deep links, quit and the commands, but no hardening init script
or native hardening, no navigation policy, no presence thread, no watchdog and no
window-state restore or save. The same as
ShellPlugin::builder().shell(self).lifecycle_only(). Shell::plugin is unchanged.
Sourcepub fn plugin(self) -> TauriPlugin<Wry>
pub fn plugin(self) -> TauriPlugin<Wry>
The single Tauri plugin that installs the whole shell, with every module enabled. Add it FIRST
so single-instance arbitration runs before any other plugin does work. To opt modules out, use
ShellPlugin::builder.