Struct tauri::AppHandle [−][src]
pub struct AppHandle<P: Params = Args<String, String, String, String, EmbeddedAssets, Wry>> { /* fields omitted */ }
Expand description
A handle to the currently running application.
This type implements Manager
which allows for manipulation of global application items.
Implementations
pub fn create_window<F>(
&self,
label: P::Label,
url: WindowUrl,
setup: F
) -> Result<()> where
F: FnOnce(<<P::Runtime as Runtime>::Dispatcher as Dispatch>::WindowBuilder, WebviewAttributes) -> (<<P::Runtime as Runtime>::Dispatcher as Dispatch>::WindowBuilder, WebviewAttributes),
pub fn create_window<F>(
&self,
label: P::Label,
url: WindowUrl,
setup: F
) -> Result<()> where
F: FnOnce(<<P::Runtime as Runtime>::Dispatcher as Dispatch>::WindowBuilder, WebviewAttributes) -> (<<P::Runtime as Runtime>::Dispatcher as Dispatch>::WindowBuilder, WebviewAttributes),
Creates a new webview window.
This is supported on crate feature system-tray
only.
system-tray
only.Gets a handle handle to the system tray.
The path resolver for the application.
Gets a copy of the global shortcut manager instance.
Gets a copy of the clipboard manager instance.
Gets the app’s configuration, defined on the tauri.conf.json
file.
Gets the app’s package information.
Trait Implementations
Grabs the Window
from the CommandItem
and returns the associated AppHandle
. This will never fail.
Emits a event to all windows.
Emits an event to a window with the specified label.
Listen to a global event.
Listen to a global event only once.
Trigger a global event.
Fetch a single window from the manager.
Add state
to the state managed by the application.
See crate::Builder
for instructions. Read more
Auto Trait Implementations
impl<P = Args<String, String, String, String, EmbeddedAssets, Wry>> !RefUnwindSafe for AppHandle<P>
impl<P> Sync for AppHandle<P> where
<<P as Params>::Runtime as Runtime>::ClipboardManager: Sync,
<<P as Params>::Runtime as Runtime>::GlobalShortcutManager: Sync,
<<P as Params>::Runtime as Runtime>::Handle: Sync,
<<P as Params>::Runtime as Runtime>::TrayHandler: Sync,
impl<P> Unpin for AppHandle<P> where
<<P as Params>::Runtime as Runtime>::ClipboardManager: Unpin,
<<P as Params>::Runtime as Runtime>::GlobalShortcutManager: Unpin,
<<P as Params>::Runtime as Runtime>::Handle: Unpin,
<<P as Params>::Runtime as Runtime>::TrayHandler: Unpin,
impl<P = Args<String, String, String, String, EmbeddedAssets, Wry>> !UnwindSafe for AppHandle<P>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V