mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: "multiple cascading refactors"
https://loglog.games/blog/leaving-rust-gamedev/#orphan-rule-should-be-optional is on point
This commit is contained in:
parent
20afc397ea
commit
fa8282a9d5
18 changed files with 175 additions and 222 deletions
|
|
@ -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(()) }
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue