#[repr(C)]pub enum AppTerminationBehavior {
ReturnToMain = 0,
RunForever = 1,
EndProcess = 2,
}Expand description
Determines what happens when all application windows are closed
Variants§
ReturnToMain = 0
Return control to main() when all windows are closed (if platform supports it). On macOS, this exits the NSApplication run loop and returns to main(). This is useful if you want to clean up resources or restart the event loop.
RunForever = 1
Keep the application running even when all windows are closed. This is the standard macOS behavior (app stays in dock until explicitly quit).
EndProcess = 2
Immediately terminate the process when all windows are closed. Calls std::process::exit(0).
Trait Implementations§
Source§impl Clone for AppTerminationBehavior
impl Clone for AppTerminationBehavior
Source§fn clone(&self) -> AppTerminationBehavior
fn clone(&self) -> AppTerminationBehavior
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AppTerminationBehavior
impl Debug for AppTerminationBehavior
Source§impl Default for AppTerminationBehavior
impl Default for AppTerminationBehavior
Source§impl Hash for AppTerminationBehavior
impl Hash for AppTerminationBehavior
Source§impl Ord for AppTerminationBehavior
impl Ord for AppTerminationBehavior
Source§fn cmp(&self, other: &AppTerminationBehavior) -> Ordering
fn cmp(&self, other: &AppTerminationBehavior) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AppTerminationBehavior
impl PartialEq for AppTerminationBehavior
Source§impl PartialOrd for AppTerminationBehavior
impl PartialOrd for AppTerminationBehavior
impl Copy for AppTerminationBehavior
impl Eq for AppTerminationBehavior
impl StructuralPartialEq for AppTerminationBehavior
Auto Trait Implementations§
impl Freeze for AppTerminationBehavior
impl RefUnwindSafe for AppTerminationBehavior
impl Send for AppTerminationBehavior
impl Sync for AppTerminationBehavior
impl Unpin for AppTerminationBehavior
impl UnwindSafe for AppTerminationBehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more