separate state from rsc
This commit is contained in:
1 parent
462c0e6416
commit
5da1e9e767
22 files changed
+373
-492
No files matched your search
@@ -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> {
|
||||
|
||||
Reference in new issue
Block a user