pub struct ToolCallId(pub String);Expand description
Canonical causal key pairing a tool call with its result. Kernel-generated
(see generate), unique within a single turn context; never the
provider-issued call id, which rides on the envelope metadata.
Tuple Fields§
§0: StringImplementations§
Source§impl ToolCallId
impl ToolCallId
Sourcepub fn generate(
round_id: RoundId,
tool_name: &str,
arguments: &Value,
position: usize,
) -> Self
pub fn generate( round_id: RoundId, tool_name: &str, arguments: &Value, position: usize, ) -> Self
tool_name + blake3(round_id + tool_name + arguments_json)[..8] + position。
round_id enters the hash preimage so the same (tool, arguments, position) yields a different id in every ModelRound — a model re-sending
the same call in a later round (the legitimate dedup-recovery path) must
not collide with a historical call_id. Uniqueness scope is a single
TurnContext.
Trait Implementations§
Source§impl Clone for ToolCallId
impl Clone for ToolCallId
Source§fn clone(&self) -> ToolCallId
fn clone(&self) -> ToolCallId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolCallId
impl Debug for ToolCallId
Source§impl<'de> Deserialize<'de> for ToolCallId
impl<'de> Deserialize<'de> for ToolCallId
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
impl Eq for ToolCallId
Source§impl Hash for ToolCallId
impl Hash for ToolCallId
Source§impl PartialEq for ToolCallId
impl PartialEq for ToolCallId
Source§impl Serialize for ToolCallId
impl Serialize for ToolCallId
impl StructuralPartialEq for ToolCallId
Auto Trait Implementations§
impl Freeze for ToolCallId
impl RefUnwindSafe for ToolCallId
impl Send for ToolCallId
impl Sync for ToolCallId
impl Unpin for ToolCallId
impl UnsafeUnpin for ToolCallId
impl UnwindSafe for ToolCallId
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