pub trait App {
type Message: Send + 'static;
// Required methods
fn render(
&mut self,
cx: &mut ViewCtx<'_, Self::Message>,
) -> Element<Self::Message>;
fn update(
&mut self,
message: Self::Message,
handle: &RuntimeHandle<Self::Message>,
);
// Provided methods
fn mount(&mut self, _handle: &RuntimeHandle<Self::Message>) { ... }
fn on_unhandled_key(
&mut self,
_key: Key,
_handle: &RuntimeHandle<Self::Message>,
) -> bool { ... }
}