pub trait App: 'static {
// Required method
fn build(
&mut self,
ui: &mut Ui,
host: &mut Host<'_>,
) -> Result<(), Box<dyn Error>>;
// Provided methods
fn action(&mut self, ui: &mut Ui, host: &mut Host<'_>, action: Action) { ... }
fn file_drop(&mut self, ui: &mut Ui, host: &mut Host<'_>, drop: FileDrop) { ... }
fn frame(&mut self, ui: &mut Ui, host: &mut Host<'_>) -> bool { ... }
}Expand description
An application: it builds its interface once, then reacts to what widgets report and
updates live content before each frame. Every call gets the Host: the window it runs
in.
Required Methods§
Provided Methods§
Sourcefn action(&mut self, ui: &mut Ui, host: &mut Host<'_>, action: Action)
fn action(&mut self, ui: &mut Ui, host: &mut Host<'_>, action: Action)
Handles an action a widget reported (a click, an edit), right after the input that caused it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".