pub trait Element { fn on_key(&self, _event: KeyEvent) { ... } fn draw(&self, _rect: Rect, _frame: &mut Frame<'_>) { ... } }