pub enum CloseResponse {
Close,
Veto,
}Expand description
Verdict returned by a window’s close guard when the user (or the app) asks to close the window.
The guard runs before the window’s tree is torn down. Returning
Veto cancels that one close attempt and
leaves the window open — the idiomatic place to pop a
“you have unsaved changes” confirmation, then re-issue the close via
EventContext::close_window_forced
once the user confirms.
Variants§
Trait Implementations§
Source§impl Clone for CloseResponse
impl Clone for CloseResponse
Source§fn clone(&self) -> CloseResponse
fn clone(&self) -> CloseResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CloseResponse
Source§impl Debug for CloseResponse
impl Debug for CloseResponse
impl Eq for CloseResponse
Source§impl PartialEq for CloseResponse
impl PartialEq for CloseResponse
impl StructuralPartialEq for CloseResponse
Auto Trait Implementations§
impl Freeze for CloseResponse
impl RefUnwindSafe for CloseResponse
impl Send for CloseResponse
impl Sync for CloseResponse
impl Unpin for CloseResponse
impl UnsafeUnpin for CloseResponse
impl UnwindSafe for CloseResponse
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