pub struct QuitGate { /* private fields */ }Expand description
The quit decision. One per app, in ShellState.
Implementations§
Source§impl QuitGate
impl QuitGate
Sourcepub fn new(bound: Option<Duration>) -> Self
pub fn new(bound: Option<Duration>) -> Self
None: drain off (today’s immediate quit). Some(bound): drain on, clamped to
MAX_QUIT_DRAIN_BOUND.
pub fn enabled(&self) -> bool
pub fn bound(&self) -> Option<Duration>
Sourcepub fn request(&self, exiting: &AtomicBool, renderer_alive: bool) -> QuitStep
pub fn request(&self, exiting: &AtomicBool, renderer_alive: bool) -> QuitStep
Decide a quit request. exiting is the shell’s exiting flag: once set (by
rk_shell_finish_quit, rk_shell_quit or the bound) the exit path never prompts again.
renderer_alive is false when no webview window remains, so nothing can answer.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for QuitGate
impl RefUnwindSafe for QuitGate
impl Send for QuitGate
impl Sync for QuitGate
impl Unpin for QuitGate
impl UnsafeUnpin for QuitGate
impl UnwindSafe for QuitGate
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