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());Trait Implementations§
impl Copy for Status
Source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Status, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Status, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Status
Source§impl Serialize for Status
impl Serialize for Status
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.