EventLoopExtRegister

Trait EventLoopExtRegister 

pub trait EventLoopExtRegister {
    // Required method
    fn register_app<A>(self, app: A)
       where A: ApplicationHandler + 'static;
}
Expand description

Additional methods on EventLoop that registers it with the system event loop.

Required Methods§

fn register_app<A>(self, app: A)
where A: ApplicationHandler + 'static,

Initialize and register the application with the system’s event loop, such that the callbacks will be run later.

§Platform-specific
  • Web: Once the event loop has been destroyed, it’s possible to reinitialize another event loop by calling this function again. This can be useful if you want to recreate the event loop while the WebAssembly module is still loaded. For example, this can be used to recreate the event loop when switching between tabs on a single page application.
  • iOS/macOS: Unimplemented.
  • Android/Orbital/Wayland/Windows/X11: Unsupported.

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.

Implementors§