#[non_exhaustive]pub enum RunEvent {
Exit,
#[non_exhaustive] ExitRequested {
code: Option<i32>,
api: ExitRequestApi,
},
#[non_exhaustive] WindowEvent {
label: String,
event: WindowEvent,
},
#[non_exhaustive] WebviewEvent {
label: String,
event: WebviewEvent,
},
Ready,
Resumed,
MainEventsCleared,
}Expand description
An application event, triggered from the event loop.
See App::run for usage examples.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Exit
Event loop is exiting.
#[non_exhaustive]ExitRequested
The app is about to exit
Fields
This variant is marked as non-exhaustive
code: Option<i32>Exit code.
Option::None when the exit is requested by user interaction,
Option::Some when requested programmatically via AppHandle and AppHandle.
api: ExitRequestApiEvent API
#[non_exhaustive]WindowEvent
An event associated with a window.
Fields
This variant is marked as non-exhaustive
event: WindowEventThe detailed event.
#[non_exhaustive]WebviewEvent
An event associated with a webview.
Fields
This variant is marked as non-exhaustive
event: WebviewEventThe detailed event.
Ready
Application ready.
Resumed
Sent if the event loop is being resumed.
MainEventsCleared
Emitted when all of the event loop’s input events have been processed and redraw processing is about to begin.
This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop.