feat(plugin): add app getter on PluginHandle

This commit is contained in:
Lucas Nogueira
2023-02-20 15:55:25 -03:00
parent 037d488dee
commit 12c947632d

View File

@@ -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)]