pub trait TerminalApp {
type Command: From<KeyPress>;
// Required methods
fn render(&self, frame: &mut Frame<'_>);
fn handle_input(&mut self, cmd: Self::Command) -> bool;
fn tick(&mut self, delta_ms: u64) -> bool;
fn should_quit(&self) -> bool;
// Provided method
fn input_extensions(&self) -> Vec<OscHandler<Self::Command>> ⓘ { ... }
}Expand description
The trait that application authors implement.
Required Associated Types§
Required Methods§
Sourcefn handle_input(&mut self, cmd: Self::Command) -> bool
fn handle_input(&mut self, cmd: Self::Command) -> bool
Handle a parsed input command. Return true if display needs redrawing.
Sourcefn tick(&mut self, delta_ms: u64) -> bool
fn tick(&mut self, delta_ms: u64) -> bool
Advance state by delta_ms. Return true if redraw needed.
Sourcefn should_quit(&self) -> bool
fn should_quit(&self) -> bool
Whether the application should exit.
Provided Methods§
Sourcefn input_extensions(&self) -> Vec<OscHandler<Self::Command>> ⓘ
fn input_extensions(&self) -> Vec<OscHandler<Self::Command>> ⓘ
Override to register custom OSC input handlers.