mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 21:56:42 +01:00
refactor: collect collections
This commit is contained in:
parent
a52066f640
commit
1d21071c86
6 changed files with 78 additions and 82 deletions
|
|
@ -8,16 +8,6 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: Engine, C: Component<E> + Exit> ExitableComponent<E> for C {}
|
||||
|
||||
#[macro_export] macro_rules! exit {
|
||||
($T:ty) => {
|
||||
impl Exit for $T {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue