pub trait EventLoopExtRunReturn {
// Required method
fn block_on_return<F>(
&mut self,
future: F,
) -> ReturnOrFinish<i32, F::Output>
where F: Future;
}
Expand description
Additional methods on EventLoop
to return control flow to the caller.
Required Methods§
Sourcefn block_on_return<F>(&mut self, future: F) -> ReturnOrFinish<i32, F::Output>where
F: Future,
fn block_on_return<F>(&mut self, future: F) -> ReturnOrFinish<i32, F::Output>where
F: Future,
Initializes the winit
event loop.
Unlike EventLoop::block_on
, this function accepts non-'static
(i.e. non-move
) closures
and returns control flow to the caller when control_flow
is set to ControlFlow::Exit
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.