better global state structure?

This commit is contained in:
iris committed 2025-12-19 21:54:48 -05:00
1 parent 30bc55c78e
commit bae17235c6
23 files changed
+335 -230

No files matched your search

+7 -4
View File
@@ -28,11 +28,14 @@ impl<E: Event> EventLike for E {
}
}
pub trait EventFn<State, Data>: Fn(EventCtx<State, Data>) + 'static {}
impl<State, F: Fn(EventCtx<State, Data>) + 'static, Data> EventFn<State, Data> for F {}
pub trait EventFn<State, Data>: Fn(&mut EventCtx<State, Data>) + 'static {}
impl<State, F: Fn(&mut EventCtx<State, Data>) + 'static, Data> EventFn<State, Data> for F {}
pub trait WidgetEventFn<State, Data, W: ?Sized>: Fn(EventIdCtx<State, Data, W>) + 'static {}
impl<State, F: Fn(EventIdCtx<State, Data, W>) + 'static, Data, W: ?Sized>
pub trait WidgetEventFn<State, Data, W: ?Sized>:
Fn(&mut EventIdCtx<State, Data, W>) + 'static
{
}
impl<State, F: Fn(&mut EventIdCtx<State, Data, W>) + 'static, Data, W: ?Sized>
WidgetEventFn<State, Data, W> for F
{
}