AppEventHandler

Trait AppEventHandler 

Source
pub trait AppEventHandler {
    type AppState;

    // Required method
    fn handle_event(
        &mut self,
        app_state: &mut Self::AppState,
        event: WindowEvent,
    ) -> Result<AppControl, Box<dyn Error>>;
}

Required Associated Types§

Required Methods§

Source

fn handle_event( &mut self, app_state: &mut Self::AppState, event: WindowEvent, ) -> Result<AppControl, Box<dyn Error>>

Implementations on Foreign Types§

Source§

impl<S> AppEventHandler for fn(&mut S, WindowEvent) -> Result<AppControl, Box<dyn Error>>

Source§

type AppState = S

Source§

fn handle_event( &mut self, app_state: &mut Self::AppState, event: WindowEvent, ) -> Result<AppControl, Box<dyn Error>>

Implementors§