Enum tauri::Event
#[non_exhaustive]
pub enum Event {
Exit,
ExitRequested {
window_label: String,
api: ExitRequestApi,
},
CloseRequested {
label: String,
api: CloseRequestApi,
},
WindowClosed(String),
Ready,
Resumed,
MainEventsCleared,
}
Expand description
An application event, triggered from the event loop.
#
Variants (Non-exhaustive)This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Exit
Event loop is exiting.
ExitRequested
The app is about to exit
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Show fields
#
Fields of ExitRequestedwindow_label: String
The label of the window that requested the exit. It is the last window managed by tauri.
api: ExitRequestApi
Event API
CloseRequested
Window close was requested by the user.
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Show fields
#
Fields of CloseRequestedlabel: String
The window label.
api: CloseRequestApi
Event API.
WindowClosed(String)
Window closed.
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.
#
Trait ImplementationsDebug for Event[src]#
implfmt(&self, f: &mut Formatter<'_>) -> Result[src]#
fnFormats the value using the given formatter. Read more
#
Auto Trait ImplementationsRefUnwindSafe for Event#
impl \!Send for Event#
implSync for Event#
impl \!Unpin for Event#
implUnwindSafe for Event#
impl \!#
Blanket ImplementationsAny for T where T: 'static + ?Sized,[src]#
impl<T>type_id(&self) -> TypeId[src]#
pub fnGets the TypeId
of self
. Read more
Borrow<T> for T where T: ?Sized,[src]#
impl<T>borrow(&self) -> &T[src]#
pub fnImmutably borrows from an owned value. Read more
BorrowMut<T> for T where T: ?Sized,[src]#
impl<T>borrow_mut(&mut self) -> &mutT[src]#
pub fnMutably borrows from an owned value. Read more
From<T> for T[src]#
impl<T>from(t: T) -> T[src]#
pub fnPerforms the conversion.
Into<U> for T where U: From<T>,[src]#
impl<T, U>into(self) -> U[src]#
pub fnPerforms the conversion.
TryFrom<U> for T where U: Into<T>,[src]#
impl<T, U>Error = Infallible#
typeThe type returned in the event of a conversion error.
try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]#
pub fnPerforms the conversion.
TryInto<U> for T where U: TryFrom<T>,[src]#
impl<T, U>Error = <U as TryFrom<T>>::Error#
typeThe type returned in the event of a conversion error.
try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]#
pub fnPerforms the conversion.