pub trait EventLoopExt<A: Application> {
// Required methods
fn send_user(
&self,
u: A::UserEvent,
) -> Result<(), EventLoopClosed<AppEvent<A>>>;
fn ping_user_input(&self) -> Result<(), EventLoopClosed<AppEvent<A>>>;
fn run_idle<F: FnOnce(&mut A, Args<'_, A>) + Send + Sync + 'static>(
&self,
f: F,
) -> Result<(), EventLoopClosed<AppEvent<A>>>;
}
Expand description
Helper trait to extend winit::EventLoopProxy
with useful functions.
Required Methods§
Sourcefn send_user(&self, u: A::UserEvent) -> Result<(), EventLoopClosed<AppEvent<A>>>
fn send_user(&self, u: A::UserEvent) -> Result<(), EventLoopClosed<AppEvent<A>>>
Sends a AppEvent::User
event.
Sourcefn ping_user_input(&self) -> Result<(), EventLoopClosed<AppEvent<A>>>
fn ping_user_input(&self) -> Result<(), EventLoopClosed<AppEvent<A>>>
Sends a AppEvent::PingUserInput
event.
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.