pub enum Status {
Initializing,
Idle,
Running,
Paused,
AwaitingApproval,
Completed,
Error,
Aborted,
}Expand description
Component execution status.
Represents the current state of a component or child.
§State Categories
| Category | States | Can Receive Work |
|---|---|---|
| Active | Running, AwaitingApproval | Yes (in progress) |
| Ready | Idle | Yes |
| Terminal | Completed, Error, Aborted | No |
| Setup | Initializing, Paused | No (temporarily) |
Variants§
Initializing
Component is initializing.
Setup phase before accepting work.
Idle
Component is idle, waiting for work.
Ready to accept requests.
Running
Component is actively processing.
Paused
Component is paused (can resume).
Temporarily stopped, can continue with Resume signal.
AwaitingApproval
Component is waiting for HIL approval.
Blocked on human decision.
Completed
Component completed successfully.
Terminal state - no more work will be done.
Error
Component encountered an error.
Terminal state - may be recoverable with retry.
Aborted
Component was aborted (by signal).
Terminal state - explicitly stopped.
Implementations§
Source§impl Status
impl Status
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Returns true if the component is actively working.
Active states: Running, AwaitingApproval
§Example
use orcs_component::Status;
assert!(Status::Running.is_active());
assert!(Status::AwaitingApproval.is_active());
assert!(!Status::Idle.is_active());Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if the component is in a terminal state.
Terminal states: Completed, Error, Aborted
§Example
use orcs_component::Status;
assert!(Status::Completed.is_terminal());
assert!(Status::Error.is_terminal());
assert!(Status::Aborted.is_terminal());
assert!(!Status::Running.is_terminal());