// Poll and process any pending application events.
//
// Returns:
//
// - the resulting state of the model.
// - whether or not an event should cause exiting the application loop.
// - the number of winit events processed processed.
Poll and process any pending application events.
Returns.

the resulting state of the model.
whether or not an event should cause exiting the application loop.
the number of winit events processed processed.
Poll and process any pending application events . Returns . the resulting state of the model . whether or not an event should cause exiting the application loop . the number of winit events processed processed .
fn poll_and_process_events<M, E>(
    app: &mut App,
    mut model: M,
    loop_ctxt: &mut LoopContext<M, E>,
) -> (M, bool, usize)
where
    M: 'static,
    E: LoopEvent,
{
    let mut event_count = 0;
    app.events_loop
        .poll_events(|event| loop_ctxt.winit_events.push(event));
    for winit_event in loop_ctxt.winit_events.drain(..) {
        event_count += 1;
        let (new_model, exit) =
            process_and_emit_winit_event(app, model, loop_ctxt.event_fn, winit_event);
        model = new_model;
        if exit {
            return (model, exit, event_count);
        }
    }
    (model, false, event_count)
}
fn poll_and_process_events < M , E > ( app : & mut App , mut model : M , loop_ctxt : & mut LoopContext < M , E > , ) -> ( M , bool , usize ) where M : ' static , E : LoopEvent , { let mut event_count = 0 ; app . events_loop . poll_events ( | event | loop_ctxt . winit_events . push ( event ) ) ; for winit_event in loop_ctxt . winit_events . drain ( .. ) { event_count += 1 ; let ( new_model , exit ) = process_and_emit_winit_event ( app , model , loop_ctxt . event_fn , winit_event ) ; model = new_model ; if exit { return ( model , exit , event_count ) ; } } ( model , false , event_count ) }
Poll and process any pending application events.
Poll and process any pending application events .
app
&mut App
model
M
loop_ctxt
&mut LoopContext<M, E>