#[repr(u8)]pub enum LifecycleTransition {
Configure = 1,
Activate = 2,
Deactivate = 3,
Cleanup = 4,
ShutdownUnconfigured = 5,
ShutdownInactive = 6,
ShutdownActive = 7,
ErrorRecovery = 8,
}Expand description
Lifecycle transition (REP-2002)
Each transition has a specific source state. Shutdown has three variants because it can originate from Unconfigured, Inactive, or Active.
Variants§
Configure = 1
Unconfigured -> (configuring) -> Inactive
Activate = 2
Inactive -> (activating) -> Active
Deactivate = 3
Active -> (deactivating) -> Inactive
Cleanup = 4
Inactive -> (cleaning up) -> Unconfigured
ShutdownUnconfigured = 5
Unconfigured -> (shutting down) -> Finalized
ShutdownInactive = 6
Inactive -> (shutting down) -> Finalized
ShutdownActive = 7
Active -> (shutting down) -> Finalized
ErrorRecovery = 8
ErrorProcessing -> (error recovery) -> Unconfigured
Implementations§
Source§impl LifecycleTransition
impl LifecycleTransition
Sourcepub fn from_shorthand(
state: LifecycleState,
name: &str,
) -> Option<LifecycleTransition>
pub fn from_shorthand( state: LifecycleState, name: &str, ) -> Option<LifecycleTransition>
Resolve a shorthand transition name from the current state.
“shutdown” maps to the correct variant based on the current state.
Returns None if the shorthand is not valid from the given state.
Sourcepub const fn from_u8(value: u8) -> Option<LifecycleTransition>
pub const fn from_u8(value: u8) -> Option<LifecycleTransition>
Try to convert from a u8 value.
Sourcepub const fn source_state(&self) -> LifecycleState
pub const fn source_state(&self) -> LifecycleState
Get the source state required for this transition.
Trait Implementations§
Source§impl Clone for LifecycleTransition
impl Clone for LifecycleTransition
Source§fn clone(&self) -> LifecycleTransition
fn clone(&self) -> LifecycleTransition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more