pub struct ToolCallState {
pub call_id: String,
pub tool_name: String,
pub arguments: Value,
pub status: ToolCallStatus,
pub resume_token: Option<String>,
pub resume: Option<ToolCallResume>,
pub scratch: Value,
pub updated_at: u64,
}Expand description
Durable per-tool-call runtime state.
Stored under __tool_call_scope.<call_id>.tool_call_state (ToolCall-scoped).
Fields§
§call_id: StringStable tool call id.
tool_name: StringTool name.
arguments: ValueTool arguments snapshot.
status: ToolCallStatusLifecycle status.
resume_token: Option<String>Token used by external actor to resume this call.
resume: Option<ToolCallResume>Resume payload written by external decision handling.
scratch: ValuePlugin/tool scratch data for this call.
updated_at: u64Last update timestamp (unix millis).
Implementations§
Source§impl ToolCallState
impl ToolCallState
Sourcepub fn into_state_action(self) -> AnyStateAction
pub fn into_state_action(self) -> AnyStateAction
Convert into a type-erased state action targeting this call’s scope.
Equivalent to AnyStateAction::new_for_call::<ToolCallState>(Set(self), call_id)
but hides the internal ToolCallStateAction type.
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<ToolCallState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallState, <__D as Deserializer<'de>>::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
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
Source§impl State for ToolCallState
impl State for ToolCallState
Source§const PATH: &'static str = "tool_call_state"
const PATH: &'static str = "tool_call_state"
Canonical JSON path for this state type. Read more
Source§type Ref<'a> = ToolCallStateRef<'a>
type Ref<'a> = ToolCallStateRef<'a>
The reference type that provides typed access.
Source§fn state_ref<'a>(
doc: &'a DocCell,
base: Path,
sink: PatchSink<'a>,
) -> <ToolCallState as State>::Ref<'a>
fn state_ref<'a>( doc: &'a DocCell, base: Path, sink: PatchSink<'a>, ) -> <ToolCallState as State>::Ref<'a>
Create a state reference at the specified path. Read more
Source§fn from_value(value: &Value) -> Result<ToolCallState, TireaError>
fn from_value(value: &Value) -> Result<ToolCallState, TireaError>
Deserialize this type from a JSON value.
Source§fn diff_ops(
old: &ToolCallState,
new: &ToolCallState,
base_path: &Path,
) -> Result<Vec<Op>, TireaError>
fn diff_ops( old: &ToolCallState, new: &ToolCallState, base_path: &Path, ) -> Result<Vec<Op>, TireaError>
Compare two instances and emit minimal ops for changed fields. Read more
Source§fn register_lattice(_registry: &mut LatticeRegistry)
fn register_lattice(_registry: &mut LatticeRegistry)
Register lattice fields into the given registry. Read more
Source§fn lattice_keys() -> &'static [&'static str]
fn lattice_keys() -> &'static [&'static str]
Return the JSON keys of fields annotated with
#[tirea(lattice)]. Read moreSource§impl StateSpec for ToolCallState
impl StateSpec for ToolCallState
Source§const SCOPE: StateScope = ::tirea_state::StateScope::ToolCall
const SCOPE: StateScope = ::tirea_state::StateScope::ToolCall
Lifecycle scope of this state type. Read more
Source§type Action = ToolCallStateAction
type Action = ToolCallStateAction
The action type accepted by this state.
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