Trait xplm::flight_loop::FlightLoopCallback

source ·
pub trait FlightLoopCallback: 'static {
    // Required method
    fn flight_loop(&mut self, state: &mut LoopState<'_>);
}
Expand description

Trait for objects that can receive flight loop callbacks

Required Methods§

source

fn flight_loop(&mut self, state: &mut LoopState<'_>)

Called periodically by X-Plane according to the provided scheduling

In this callback, processing can be done. Drawing cannot be done.

The provided LoopState can be used to get information and change the scheduling of callbacks. If the scheduling is not changed, this callback will continue to be called with the same schedule.

Implementors§

source§

impl<F> FlightLoopCallback for F
where F: 'static + FnMut(&mut LoopState<'_>),

Closures can be used as FlightLoopCallbacks