pub struct Builder<R: Runtime> { /* private fields */ }Implementations§
Source§impl<R: Runtime> Builder<R>
impl<R: Runtime> Builder<R>
pub fn new() -> Self
Sourcepub fn callback<F: FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static>(
self,
f: F,
) -> Self
pub fn callback<F: FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static>( self, f: F, ) -> Self
Function to call when a secondary instance was opened by the user and killed by the plugin.
If the deep-link feature is enabled, the plugin triggers the deep-link plugin before executing the callback.
Sourcepub fn dbus_id(self, dbus_id: impl Into<String>) -> Self
pub fn dbus_id(self, dbus_id: impl Into<String>) -> Self
Set a custom D-Bus ID, used on Linux. The plugin will append a .SingleInstance subname.
For example com.mycompany.myapp will result in the plugin registering its D-Bus service on com.mycompany.myapp.SingleInstance.
Usually you want the same base ID across all components in your app.
Defaults to the app’s bundle identifier set in tauri.conf.json.
pub fn build(self) -> TauriPlugin<R>
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for Builder<R>
impl<R> !RefUnwindSafe for Builder<R>
impl<R> Send for Builder<R>
impl<R> Sync for Builder<R>
impl<R> Unpin for Builder<R>
impl<R> !UnwindSafe for Builder<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more