pub trait FlightLoopCallback<T>: 'static {
// Required method
fn flight_loop(
&mut self,
x: &mut XPAPI,
state: &mut LoopState<T>,
) -> LoopResult;
}Expand description
Trait for objects that can receive flight loop callbacks
Required Methods§
Sourcefn flight_loop(&mut self, x: &mut XPAPI, state: &mut LoopState<T>) -> LoopResult
fn flight_loop(&mut self, x: &mut XPAPI, state: &mut LoopState<T>) -> LoopResult
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<F, T> FlightLoopCallback<T> for F
Closures can be used as FlightLoopCallbacks