separate state from rsc

This commit is contained in:
2026-01-01 22:18:08 -05:00
parent 462c0e6416
commit 5da1e9e767
22 changed files with 373 additions and 492 deletions

View File

@@ -11,6 +11,13 @@ pub trait AppState {
fn window_event(&mut self, event: WindowEvent, event_loop: &ActiveEventLoop);
fn event(&mut self, event: Self::Event, event_loop: &ActiveEventLoop);
fn exit(&mut self);
fn run()
where
Self: Sized,
{
App::<Self>::run();
}
}
pub struct App<State: AppState> {