pub trait App: Sized + 'static {
Show 13 methods
// Required method
fn render(&mut self, ctx: &Context, frame: &mut Frame);
// Provided methods
fn mobile_text_styles(&self) -> Option<BTreeMap<TextStyle, FontId>> { ... }
fn default_text_styles(&self) -> Option<BTreeMap<TextStyle, FontId>> { ... }
fn handle_event(&mut self, _ctx: &Context, _event: RuntimeEvent) { ... }
fn handle_keyboard_events(
&mut self,
_key: Key,
_pressed: bool,
_modifiers: &Modifiers,
_repeat: bool,
) { ... }
fn device(&mut self) -> Option<&mut Device> { ... }
fn init(&mut self, _runtime: &Runtime, _cc: &CreationContext<'_>) { ... }
fn save(&mut self, _storage: &mut dyn Storage) { ... }
fn on_exit(&mut self) { ... }
fn auto_save_interval(&self) -> Duration { ... }
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4] { ... }
fn persist_egui_memory(&self) -> bool { ... }
fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput) { ... }
}
Required Methods§
Provided Methods§
fn mobile_text_styles(&self) -> Option<BTreeMap<TextStyle, FontId>>
fn default_text_styles(&self) -> Option<BTreeMap<TextStyle, FontId>>
fn handle_event(&mut self, _ctx: &Context, _event: RuntimeEvent)
fn handle_keyboard_events( &mut self, _key: Key, _pressed: bool, _modifiers: &Modifiers, _repeat: bool, )
fn device(&mut self) -> Option<&mut Device>
fn init(&mut self, _runtime: &Runtime, _cc: &CreationContext<'_>)
fn save(&mut self, _storage: &mut dyn Storage)
fn on_exit(&mut self)
Sourcefn auto_save_interval(&self) -> Duration
fn auto_save_interval(&self) -> Duration
Time between automatic calls to Self::save
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
fn persist_egui_memory(&self) -> bool
fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.