trait based event system

This commit is contained in:
Evan Almloff committed 2023-08-25 17:02:48 -05:00
1 parent a72718134b
commit 299b123446
28 files changed
+2407 -734

No files matched your search

+1 -3
View File
@@ -151,8 +151,6 @@ pub fn event_bubbles(evt: &str) -> bool {
}
}
use std::future::Future;
#[doc(hidden)]
pub trait EventReturn<P>: Sized {
fn spawn(self, _cx: &dioxus_core::ScopeState) {}
@@ -164,7 +162,7 @@ pub struct AsyncMarker;
impl<T> EventReturn<AsyncMarker> for T
where
T: Future<Output = ()> + 'static,
T: std::future::Future<Output = ()> + 'static,
{
#[inline]
fn spawn(self, cx: &dioxus_core::ScopeState) {