Pipe events into subviews (#13)

and match only unhandled events afterwards
This commit is contained in:
Jens K.
2024-12-12 18:43:12 +01:00
committed by GitHub
parent 64300631c7
commit 6c7bedabe3
5 changed files with 41 additions and 64 deletions

View File

@@ -76,5 +76,5 @@ fn crossterm_stream() -> Pin<Box<dyn Stream<Item = Event>>> {
}
pub trait EventHandler {
fn update(&mut self, _: Event);
fn update(&mut self, _: Event) -> Option<Event>;
}