pub enum ShutdownState<P, N> {
AwaitingPlan,
AwaitingPlanAfterShutdown,
Ready {
plan: P,
},
Stopping {
plan: P,
phase: usize,
awaiting: Vec<N>,
},
Completed,
}Expand description
Complete phase of coordinated shutdown, including plan installation.
The installed plan remains owned by the exact phase in which it is valid. A shutdown request received before installation has its own state and is discharged immediately when a plan later arrives. No correlated readiness flag or optional plan can describe a contradictory combination.
Variants§
AwaitingPlan
Child establishment has not yet produced the plan.
AwaitingPlanAfterShutdown
Shutdown was requested while child establishment was incomplete.
Ready
The validated plan is installed and shutdown has not been requested.
Fields
§
plan: PStopping
One plan phase is active and owns its outstanding child IDs.
Completed
Every configured phase completed, or the installed plan was empty.
Trait Implementations§
Source§impl<P: Clone, N: Clone> Clone for ShutdownState<P, N>
impl<P: Clone, N: Clone> Clone for ShutdownState<P, N>
Source§fn clone(&self) -> ShutdownState<P, N>
fn clone(&self) -> ShutdownState<P, N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<P: Eq, N: Eq> Eq for ShutdownState<P, N>
impl<P, N> StructuralPartialEq for ShutdownState<P, N>
Auto Trait Implementations§
impl<P, N> Freeze for ShutdownState<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for ShutdownState<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for ShutdownState<P, N>
impl<P, N> Sync for ShutdownState<P, N>
impl<P, N> Unpin for ShutdownState<P, N>
impl<P, N> UnsafeUnpin for ShutdownState<P, N>where
P: UnsafeUnpin,
impl<P, N> UnwindSafe for ShutdownState<P, N>where
P: UnwindSafe,
N: UnwindSafe,
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