diff options
author | Shav Kinderlehrer <[email protected]> | 2024-03-11 09:21:46 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2024-03-11 09:21:46 -0400 |
commit | 0c5e8ab544823fbb4936c536ee1d8a66298f7e51 (patch) | |
tree | 438182a818577a80e01bba75ff19e2847bc3ec47 /src/component.rs | |
parent | 832eb17a68e37f287206ec319a316ea91247808a (diff) | |
download | molehole-0c5e8ab544823fbb4936c536ee1d8a66298f7e51.tar.gz molehole-0c5e8ab544823fbb4936c536ee1d8a66298f7e51.zip |
Pass actions to components
Diffstat (limited to 'src/component.rs')
-rw-r--r-- | src/component.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/component.rs b/src/component.rs index 8ec7d26..65d865c 100644 --- a/src/component.rs +++ b/src/component.rs @@ -11,6 +11,9 @@ pub trait Component { } #[allow(unused)] + fn handle_action(&mut self, action: AppAction) {} + + #[allow(unused)] fn handle_event(&mut self, event: AppEvent) -> Result<Option<AppAction>> { match event { AppEvent::Key(key_event) => Ok(self.handle_key_event(key_event)?), |