pub struct RuntimeLifecycle { /* private fields */ }Expand description
Thread-safe state machine for the Runtime process lifecycle.
Implementations§
Source§impl RuntimeLifecycle
impl RuntimeLifecycle
Sourcepub fn current(&self) -> RuntimeLifecycleState
pub fn current(&self) -> RuntimeLifecycleState
Returns the current lifecycle state.
Sourcepub fn apply(
&self,
event: RuntimeLifecycleEvent,
) -> RuntimeResult<RuntimeLifecycleState>
pub fn apply( &self, event: RuntimeLifecycleEvent, ) -> RuntimeResult<RuntimeLifecycleState>
Applies one lifecycle event and returns the resulting state.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Reports whether the lifecycle is in the normal running state.
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Reports whether shutdown has completed.
Sourcepub fn is_restricted(&self) -> bool
pub fn is_restricted(&self) -> bool
Reports whether restricted operation is active.
Trait Implementations§
Source§impl Clone for RuntimeLifecycle
impl Clone for RuntimeLifecycle
Source§impl Debug for RuntimeLifecycle
impl Debug for RuntimeLifecycle
Auto Trait Implementations§
impl !Freeze for RuntimeLifecycle
impl !RefUnwindSafe for RuntimeLifecycle
impl Send for RuntimeLifecycle
impl Sync for RuntimeLifecycle
impl Unpin for RuntimeLifecycle
impl UnsafeUnpin for RuntimeLifecycle
impl UnwindSafe for RuntimeLifecycle
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