#[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<Self>
pub fn from_shorthand(state: LifecycleState, name: &str) -> Option<Self>
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 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
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 moreSource§impl Debug for LifecycleTransition
impl Debug for LifecycleTransition
Source§impl Hash for LifecycleTransition
impl Hash for LifecycleTransition
Source§impl PartialEq for LifecycleTransition
impl PartialEq for LifecycleTransition
impl Copy for LifecycleTransition
impl Eq for LifecycleTransition
impl StructuralPartialEq for LifecycleTransition
Auto Trait Implementations§
impl Freeze for LifecycleTransition
impl RefUnwindSafe for LifecycleTransition
impl Send for LifecycleTransition
impl Sync for LifecycleTransition
impl Unpin for LifecycleTransition
impl UnsafeUnpin for LifecycleTransition
impl UnwindSafe for LifecycleTransition
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