pub struct ToolCallState {
pub call_id: String,
pub tool_name: String,
pub arguments: Value,
pub status: ToolCallStatus,
pub updated_at: u64,
pub resume_mode: ToolCallResumeMode,
pub suspension_id: Option<String>,
pub suspension_reason: Option<String>,
pub resume_input: Option<ToolCallResume>,
}Expand description
Per-tool-call lifecycle state.
Fields§
§call_id: String§tool_name: String§arguments: Value§status: ToolCallStatus§updated_at: u64§resume_mode: ToolCallResumeModeResume mode from the SuspendTicket (set when status becomes Suspended).
suspension_id: Option<String>External-facing suspension id used by protocols that distinguish approval/interrupt ids from the underlying tool call id.
suspension_reason: Option<String>Suspension reason/action from the active SuspendTicket.
resume_input: Option<ToolCallResume>Most recent external resume input applied to this suspended tool call.
Implementations§
Source§impl ToolCallState
impl ToolCallState
pub fn new( call_id: impl Into<String>, tool_name: impl Into<String>, arguments: Value, status: ToolCallStatus, updated_at: u64, ) -> Self
pub fn with_resume_mode(self, resume_mode: ToolCallResumeMode) -> Self
pub fn with_suspension( self, suspension_id: Option<String>, suspension_reason: Option<String>, ) -> Self
pub fn with_resume_input(self, resume_input: Option<ToolCallResume>) -> Self
Trait Implementations§
Source§impl Clone for ToolCallState
impl Clone for ToolCallState
Source§fn clone(&self) -> ToolCallState
fn clone(&self) -> ToolCallState
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 ToolCallState
impl Debug for ToolCallState
Source§impl Default for ToolCallState
impl Default for ToolCallState
Source§fn default() -> ToolCallState
fn default() -> ToolCallState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolCallState
impl<'de> Deserialize<'de> for ToolCallState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolCallState
impl PartialEq for ToolCallState
Source§impl Serialize for ToolCallState
impl Serialize for ToolCallState
impl StructuralPartialEq for ToolCallState
Auto Trait Implementations§
impl Freeze for ToolCallState
impl RefUnwindSafe for ToolCallState
impl Send for ToolCallState
impl Sync for ToolCallState
impl Unpin for ToolCallState
impl UnsafeUnpin for ToolCallState
impl UnwindSafe for ToolCallState
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