mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
feat(plugin): add app getter on PluginHandle
This commit is contained in:
@@ -77,6 +77,13 @@ pub struct PluginHandle<R: Runtime> {
|
||||
handle: AppHandle<R>,
|
||||
}
|
||||
|
||||
impl<R: Runtime> PluginHandle<R> {
|
||||
/// Returns the application handle.
|
||||
pub fn app(&self) -> &AppHandle<R> {
|
||||
&self.handle
|
||||
}
|
||||
}
|
||||
|
||||
/// Api exposed to the plugin setup hook.
|
||||
#[derive(Clone)]
|
||||
#[allow(dead_code)]
|
||||
|
||||
Reference in New Issue
Block a user