pub trait EventLoopExt {
type User;
// Required method
fn block_on<F, Fut>(self, handler: F, fut: Fut) -> !
where F: FnMut(Event<'_, Self::User>, &Elwt<Signal<Self::User>>, &mut ControlFlow) + 'static,
Fut: Future<Output = Infallible> + 'static;
}
Expand description
An extension trait for EventLoop
that allows one to block on a future.
Required Associated Types§
Required Methods§
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.