pub struct RuntimeControlAuthority { /* private fields */ }Expand description
The canonical authority for RuntimeControl state.
Holds the canonical phase + fields and delegates all transitions through the encoded transition table.
Implementations§
Source§impl RuntimeControlAuthority
impl RuntimeControlAuthority
Sourcepub fn from_state(phase: RuntimeState) -> Self
pub fn from_state(phase: RuntimeState) -> Self
Create an authority initialized to a specific phase (for recovery).
Sourcepub fn phase(&self) -> RuntimeState
pub fn phase(&self) -> RuntimeState
Current phase (read from canonical state).
Sourcepub fn current_run_id(&self) -> Option<&RunId>
pub fn current_run_id(&self) -> Option<&RunId>
Current run ID from canonical state.
Sourcepub fn pre_run_state(&self) -> Option<RuntimeState>
pub fn pre_run_state(&self) -> Option<RuntimeState>
Pre-run state from canonical state.
Sourcepub fn wake_pending(&self) -> bool
pub fn wake_pending(&self) -> bool
Whether a wake is pending.
Sourcepub fn process_pending(&self) -> bool
pub fn process_pending(&self) -> bool
Whether immediate processing is pending.
Sourcepub fn is_attached(&self) -> bool
pub fn is_attached(&self) -> bool
Check if the runtime is in the Attached state.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the runtime is in the Running state.
Sourcepub fn can_process_queue(&self) -> bool
pub fn can_process_queue(&self) -> bool
Check if the runtime can process queued inputs.
Sourcepub fn can_accept(&self, input: &RuntimeControlInput) -> bool
pub fn can_accept(&self, input: &RuntimeControlInput) -> bool
Check if a transition is legal without applying it.
Trait Implementations§
Source§impl Clone for RuntimeControlAuthority
impl Clone for RuntimeControlAuthority
Source§fn clone(&self) -> RuntimeControlAuthority
fn clone(&self) -> RuntimeControlAuthority
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 RuntimeControlAuthority
impl Debug for RuntimeControlAuthority
Source§impl Default for RuntimeControlAuthority
impl Default for RuntimeControlAuthority
Source§impl RuntimeControlMutator for RuntimeControlAuthority
impl RuntimeControlMutator for RuntimeControlAuthority
Source§fn apply(
&mut self,
input: RuntimeControlInput,
) -> Result<RuntimeControlTransition, RuntimeStateTransitionError>
fn apply( &mut self, input: RuntimeControlInput, ) -> Result<RuntimeControlTransition, RuntimeStateTransitionError>
Apply a typed input to the current machine state. Read more
Auto Trait Implementations§
impl Freeze for RuntimeControlAuthority
impl RefUnwindSafe for RuntimeControlAuthority
impl Send for RuntimeControlAuthority
impl Sync for RuntimeControlAuthority
impl Unpin for RuntimeControlAuthority
impl UnsafeUnpin for RuntimeControlAuthority
impl UnwindSafe for RuntimeControlAuthority
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