mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-12 14:46:41 +01:00
wip: slowly putting it back together
This commit is contained in:
parent
7fbb40fad6
commit
461c60d6b3
18 changed files with 788 additions and 774 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use crate::*;
|
||||
|
||||
pub trait Exit: Send {
|
||||
fn exited (&self) -> bool;
|
||||
fn exit (&mut self);
|
||||
|
|
@ -18,3 +20,11 @@ pub trait Exit: Send {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Marker trait for [Component]s that can [Exit]
|
||||
pub trait ExitableComponent<E>: Exit + Component<E> where E: Engine {
|
||||
/// Perform type erasure for collecting heterogeneous components.
|
||||
fn boxed (self) -> Box<dyn ExitableComponent<E>> where Self: Sized + 'static {
|
||||
Box::new(self)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue