wip: "multiple cascading refactors"

https://loglog.games/blog/leaving-rust-gamedev/#orphan-rule-should-be-optional is on point
This commit is contained in:
🪞👃🪞 2024-09-09 21:25:04 +03:00
parent 20afc397ea
commit fa8282a9d5
18 changed files with 175 additions and 222 deletions

View file

@ -6,7 +6,7 @@ pub trait App<T: Engine> {
}
/// Platform backend.
pub trait Engine: Sized {
pub trait Engine: Send + Sync + Sized {
fn setup (&mut self) -> Usually<()> { Ok(()) }
fn exited (&self) -> bool;
fn teardown (&mut self) -> Usually<()> { Ok(()) }

View file

@ -9,6 +9,7 @@ pub use once_cell::sync::Lazy;
pub use std::sync::atomic::{Ordering, AtomicBool};
pub use std::rc::Rc;
pub use std::cell::RefCell;
pub use std::marker::PhantomData;
pub(crate) use std::error::Error;
pub(crate) use std::io::{stdout};
pub(crate) use std::thread::{spawn, JoinHandle};