pub struct CurrentToolInvocation { /* private fields */ }Expand description
Marker attached to crate::ExecutionContext extensions while a
tool dispatch is in flight. The layer that brackets dispatch
(ToolEventLayer in entelix-agents) is the only producer; tools
read it indirectly through the record_phase helpers and never
construct it themselves.
Implementations§
Source§impl CurrentToolInvocation
impl CurrentToolInvocation
Sourcepub fn new(
tool_use_id: impl Into<String>,
tool_name: impl Into<String>,
) -> Result<Self>
pub fn new( tool_use_id: impl Into<String>, tool_name: impl Into<String>, ) -> Result<Self>
Build a marker for one dispatch. Validates that tool_use_id
and tool_name are well-formed request identifiers (no
control characters, no whitespace-only strings) so a malformed
dispatch never poisons the phase channel.
Sourcepub fn tool_use_id(&self) -> &str
pub fn tool_use_id(&self) -> &str
Stable tool-use id for this dispatch.
Sourcepub fn dispatch_elapsed_ms(&self) -> u64
pub fn dispatch_elapsed_ms(&self) -> u64
Wall-clock elapsed since dispatch start, saturated to
u64::MAX milliseconds. Sinks use this as a per-dispatch
timeline reference.
Trait Implementations§
Source§impl Clone for CurrentToolInvocation
impl Clone for CurrentToolInvocation
Source§fn clone(&self) -> CurrentToolInvocation
fn clone(&self) -> CurrentToolInvocation
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 moreAuto Trait Implementations§
impl Freeze for CurrentToolInvocation
impl RefUnwindSafe for CurrentToolInvocation
impl Send for CurrentToolInvocation
impl Sync for CurrentToolInvocation
impl Unpin for CurrentToolInvocation
impl UnsafeUnpin for CurrentToolInvocation
impl UnwindSafe for CurrentToolInvocation
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