Skip to main content

Shell

Struct Shell 

Source
pub struct Shell { /* private fields */ }

Implementations§

Source§

impl Shell

Source

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

Source

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.

Source

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.

Source

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.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Shell

§

impl !UnwindSafe for Shell

§

impl Freeze for Shell

§

impl Send for Shell

§

impl Sync for Shell

§

impl Unpin for Shell

§

impl UnsafeUnpin for Shell

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.