pub enum ModuleState {
Loaded,
Initializing,
Running,
Unloading,
Failed(String),
}Expand description
Module lifecycle state.
State machine:
Loaded -> Initializing -> Running -> Unloading -> (removed)
| | | |
+---------->+--->--------+--->-------+---> FailedVariants§
Loaded
Module is loaded but not initialized.
Initializing
Module is currently initializing.
Running
Module is running normally.
Unloading
Module is being unloaded.
Failed(String)
Module failed (with error message).
Implementations§
Source§impl ModuleState
impl ModuleState
Sourcepub const fn can_transition_to(&self, next: &Self) -> bool
pub const fn can_transition_to(&self, next: &Self) -> bool
Check if transition to another state is valid.
Trait Implementations§
Source§impl Clone for ModuleState
impl Clone for ModuleState
Source§fn clone(&self) -> ModuleState
fn clone(&self) -> ModuleState
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 ModuleState
impl Debug for ModuleState
Source§impl Default for ModuleState
impl Default for ModuleState
Source§fn default() -> ModuleState
fn default() -> ModuleState
Returns the “default value” for a type. Read more
Source§impl Display for ModuleState
impl Display for ModuleState
Source§impl PartialEq for ModuleState
impl PartialEq for ModuleState
impl Eq for ModuleState
impl StructuralPartialEq for ModuleState
Auto Trait Implementations§
impl Freeze for ModuleState
impl RefUnwindSafe for ModuleState
impl Send for ModuleState
impl Sync for ModuleState
impl Unpin for ModuleState
impl UnsafeUnpin for ModuleState
impl UnwindSafe for ModuleState
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