|
@@ -70,13 +70,22 @@ type OnPageLoad<R> = dyn FnMut(Window<R>, PageLoadPayload) + Send;
|
|
|
type OnDrop<R> = dyn FnOnce(AppHandle<R>) + Send;
|
|
|
|
|
|
/// A handle to a plugin.
|
|
|
-#[derive(Clone)]
|
|
|
+#[derive(Debug)]
|
|
|
#[allow(dead_code)]
|
|
|
pub struct PluginHandle<R: Runtime> {
|
|
|
name: &'static str,
|
|
|
handle: AppHandle<R>,
|
|
|
}
|
|
|
|
|
|
+impl<R: Runtime> Clone for PluginHandle<R> {
|
|
|
+ fn clone(&self) -> Self {
|
|
|
+ Self {
|
|
|
+ name: self.name,
|
|
|
+ handle: self.handle.clone(),
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
impl<R: Runtime> PluginHandle<R> {
|
|
|
/// Returns the application handle.
|
|
|
pub fn app(&self) -> &AppHandle<R> {
|