Trait AppDelegate
pub trait AppDelegate<T> {
    // Required method
    fn event(
        &mut self,
        cx: &mut DelegateCx<'_, '_, T>,
        data: &mut T,
        event: &Event,
    ) -> bool;
    // Provided methods
    fn init(&mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T) { ... }
    fn idle(&mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T) { ... }
}Expand description
A delegate for handling events in an application.
Required Methods§
fn event(
    &mut self,
    cx: &mut DelegateCx<'_, '_, T>,
    data: &mut T,
    event: &Event,
) -> bool
fn event( &mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T, event: &Event, ) -> bool
Handle an event.
Provided Methods§
fn init(&mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T)
fn init(&mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T)
Called when the application is initialized.
fn idle(&mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T)
fn idle(&mut self, cx: &mut DelegateCx<'_, '_, T>, data: &mut T)
Called when the application is idle.