pub trait Component {
// Required method
fn render(&mut self, f: &mut Frame<'_>, area: Rect);
// Provided methods
fn init(&mut self) -> Result<()> { ... }
fn handle_action(&mut self, action: &Action) -> Option<Action> { ... }
}Expand description
Component trait for UI elements
Required Methods§
Provided Methods§
Sourcefn handle_action(&mut self, action: &Action) -> Option<Action>
fn handle_action(&mut self, action: &Action) -> Option<Action>
Handle an action and optionally return a new action