Driver: Add ability to clear all global event handlers.

Closes #32. This should make event handler cleanup considerably easier depending on use case.
This commit is contained in:
Kyle Simpson
2021-01-17 21:29:19 +00:00
parent dcb6ad97b2
commit 55b8e7fb4e
6 changed files with 18 additions and 0 deletions

View File

@@ -164,6 +164,10 @@ impl GlobalEvents {
holder.push(index);
}
pub(crate) fn remove_handlers(&mut self) {
self.store = EventStore::new();
}
pub(crate) async fn tick(
&mut self,
events: &mut Vec<EventStore>,