pub enum ToolCallStatus {
New,
Running,
Suspended,
Resuming,
Succeeded,
Failed,
Cancelled,
}Expand description
Tool call lifecycle status for suspend/resume capable execution.
Variants§
New
Newly observed call that has not started execution yet.
Running
Call is currently executing.
Suspended
Call is suspended waiting for a resume decision.
Resuming
Call is resuming with external decision input.
Succeeded
Call finished successfully.
Failed
Call finished with failure.
Cancelled
Call was cancelled.
Implementations§
Source§impl ToolCallStatus
impl ToolCallStatus
Sourcepub const ASCII_STATE_MACHINE: &'static str = r#"new ------------> running
| |
| v
+------------> suspended -----> resuming
| |
+---------------+
running/resuming ---> succeeded
running/resuming ---> failed
running/suspended/resuming ---> cancelled"#
pub const ASCII_STATE_MACHINE: &'static str = r#"new ------------> running | | | v +------------> suspended -----> resuming | | +---------------+ running/resuming ---> succeeded running/resuming ---> failed running/suspended/resuming ---> cancelled"#
Canonical tool-call lifecycle state machine used by runtime tests.
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Whether this status is terminal (no further lifecycle transition expected).
Sourcepub fn can_transition_to(self, next: ToolCallStatus) -> bool
pub fn can_transition_to(self, next: ToolCallStatus) -> bool
Validate lifecycle transition from self to next.
Trait Implementations§
Source§impl Clone for ToolCallStatus
impl Clone for ToolCallStatus
Source§fn clone(&self) -> ToolCallStatus
fn clone(&self) -> ToolCallStatus
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 ToolCallStatus
impl Debug for ToolCallStatus
Source§impl Default for ToolCallStatus
impl Default for ToolCallStatus
Source§fn default() -> ToolCallStatus
fn default() -> ToolCallStatus
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolCallStatus
impl<'de> Deserialize<'de> for ToolCallStatus
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolCallStatus
impl PartialEq for ToolCallStatus
Source§impl Serialize for ToolCallStatus
impl Serialize for ToolCallStatus
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,
Serialize this value into the given Serde serializer. Read more
impl Copy for ToolCallStatus
impl Eq for ToolCallStatus
impl StructuralPartialEq for ToolCallStatus
Auto Trait Implementations§
impl Freeze for ToolCallStatus
impl RefUnwindSafe for ToolCallStatus
impl Send for ToolCallStatus
impl Sync for ToolCallStatus
impl Unpin for ToolCallStatus
impl UnsafeUnpin for ToolCallStatus
impl UnwindSafe for ToolCallStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.