pub enum CloseReply {
Close,
Keep,
}Expand description
What to do about a close request.
The reply exists because closing is the one window operation with a
decision in it — “you have unsaved changes” — and a shell that closes the
window before asking has already lost the argument. Both Wayland
(xdg_toplevel.close is purely advisory) and X11
(WM_DELETE_WINDOW) model it exactly this way; Win32’s WM_CLOSE does too.
Variants§
Close
Destroy the window. A
WindowDestroyed event follows.
Keep
Keep it open — the application handled the request itself, by showing a save prompt or by refusing.
Trait Implementations§
Source§impl Clone for CloseReply
impl Clone for CloseReply
impl Copy for CloseReply
Source§impl Debug for CloseReply
impl Debug for CloseReply
Source§impl Default for CloseReply
impl Default for CloseReply
impl Eq for CloseReply
Source§impl Hash for CloseReply
impl Hash for CloseReply
Source§impl PartialEq for CloseReply
impl PartialEq for CloseReply
impl StructuralPartialEq for CloseReply
Auto Trait Implementations§
impl Freeze for CloseReply
impl RefUnwindSafe for CloseReply
impl Send for CloseReply
impl Sync for CloseReply
impl Unpin for CloseReply
impl UnsafeUnpin for CloseReply
impl UnwindSafe for CloseReply
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