From 12c947632d5bb49755a8e541ef5376cdfd7dce2f Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 20 Feb 2023 15:55:25 -0300 Subject: [PATCH] feat(plugin): add app getter on PluginHandle --- core/tauri/src/plugin.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/tauri/src/plugin.rs b/core/tauri/src/plugin.rs index 17234c9e4..d716824ef 100644 --- a/core/tauri/src/plugin.rs +++ b/core/tauri/src/plugin.rs @@ -77,6 +77,13 @@ pub struct PluginHandle { handle: AppHandle, } +impl PluginHandle { + /// Returns the application handle. + pub fn app(&self) -> &AppHandle { + &self.handle + } +} + /// Api exposed to the plugin setup hook. #[derive(Clone)] #[allow(dead_code)]