pub struct RestartPending { /* private fields */ }Expand description
The state entered after any shutdown attempt.
Dropping an armed value makes one best-effort restart attempt and then ends
the session. This covers early returns, panics, and partial shutdown. This
typestate is Send.
Implementations§
Source§impl RestartPending
impl RestartPending
Sourcepub const fn shutdown_outcome(&self) -> &OperationOutcome
pub const fn shutdown_outcome(&self) -> &OperationOutcome
Returns the retained shutdown result.
Sourcepub fn restart(self) -> RecoveryCompletion
pub fn restart(self) -> RecoveryCompletion
Attempts restart even when shutdown failed.
Sourcepub fn restart_with_progress<F>(
self,
callback: F,
) -> Result<RecoveryCompletion, OperationNotStarted<Self>>
pub fn restart_with_progress<F>( self, callback: F, ) -> Result<RecoveryCompletion, OperationNotStarted<Self>>
Attempts restart with validated, strictly increasing progress.
The error deliberately owns the full pending state so recovery cannot be lost merely to reduce the enum size.
Sourcepub fn leave_stopped(self) -> RecoveryCompletion
pub fn leave_stopped(self) -> RecoveryCompletion
Explicitly opts out of automatic restart.
Trait Implementations§
Source§impl Drop for RestartPending
impl Drop for RestartPending
Auto Trait Implementations§
impl Freeze for RestartPending
impl RefUnwindSafe for RestartPending
impl Send for RestartPending
impl Sync for RestartPending
impl Unpin for RestartPending
impl UnsafeUnpin for RestartPending
impl UnwindSafe for RestartPending
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