pub enum Effect {
Ask,
Save,
Shutdown {
keep_recovery: bool,
},
Allow,
Refuse,
}Expand description
What the app must do, in order.
Variants§
Ask
Show “Save changes?”.
Save
Save the document.
Shutdown
Stop jobs, flush settings and telemetry, end autosave. keep_recovery: the changes are
unsaved and the user wasn’t asked, so autosave keeps them for the next launch.
Allow
reply(true): let the app end.
Refuse
reply(false): stay open.
Trait Implementations§
impl Copy for Effect
impl Eq for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Forget for Effect
impl Freeze for Effect
impl Move for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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