wip: fix implicit static

This commit is contained in:
🪞👃🪞 2024-09-09 17:49:50 +03:00
parent eeb323b742
commit 49d2055147
6 changed files with 27 additions and 27 deletions

View file

@ -20,3 +20,13 @@ 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 {}