pub trait EventLoopRunReturnExt {
type User;
// Required method
fn block_on_return<F, Fut>(
&mut self,
handler: F,
fut: Fut,
) -> BlockOnReturnResult<Fut::Output>
where F: FnMut(Event<'_, Self::User>, &Elwt<Signal<Self::User>>, &mut ControlFlow),
Fut: Future;
}Expand description
An extension trait for EventLoop that allows one to block on a non-infinite future.
Required Associated Types§
Required Methods§
Sourcefn block_on_return<F, Fut>(
&mut self,
handler: F,
fut: Fut,
) -> BlockOnReturnResult<Fut::Output>
fn block_on_return<F, Fut>( &mut self, handler: F, fut: Fut, ) -> BlockOnReturnResult<Fut::Output>
Block on the provided future until either the loop exits or the future returns a value.
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.