pub enum CloseAction {
Exit,
KeepRunning,
}Expand description
What the shell should do about a window-close request (see
DesktopExtensions::on_close_requested).
Variants§
Exit
Exit the event loop — this shell’s historical unconditional behavior and
the default. Returning from run_app is what drops the frame executor,
which is what persists the pipeline cache, so this is also the only
action that runs the real shutdown path.
KeepRunning
Leave the loop running: the extension has already handled the request
(macOS hiding the window instead of quitting, per
DesktopConfig::quit_on_last_window_closed). The extension then owns
the eventual real exit — nothing else in this core will call
event_loop.exit() on its behalf, so a shell that returns this and
never quits leaves the app running with no window, which is precisely
the macOS convention it exists for.
Trait Implementations§
Source§impl Clone for CloseAction
impl Clone for CloseAction
impl Copy for CloseAction
Source§impl Debug for CloseAction
impl Debug for CloseAction
impl Eq for CloseAction
Source§impl PartialEq for CloseAction
impl PartialEq for CloseAction
impl StructuralPartialEq for CloseAction
Auto Trait Implementations§
impl Freeze for CloseAction
impl RefUnwindSafe for CloseAction
impl Send for CloseAction
impl Sync for CloseAction
impl Unpin for CloseAction
impl UnsafeUnpin for CloseAction
impl UnwindSafe for CloseAction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.