pub struct ToolReturnRecordInput<'a> {
pub session_id: &'a SessionId,
pub run_id: &'a RunId,
pub tool_call_id: &'a str,
pub tool_name: &'a str,
pub metadata: &'a Metadata,
pub trace_context: Option<&'a TraceContext>,
pub policy: Option<Value>,
}Expand description
Tool-return evidence used to derive durable HITL records without depending on model crates.
Fields§
§session_id: &'a SessionIdSession id that owns the tool return.
run_id: &'a RunIdRun id that owns the tool return.
tool_call_id: &'a strTool call id.
tool_name: &'a strTool name.
metadata: &'a MetadataTool return metadata.
trace_context: Option<&'a TraceContext>Trace context propagated by the run, when available.
policy: Option<Value>Optional host policy metadata to copy into created records.
Implementations§
Source§impl<'a> ToolReturnRecordInput<'a>
impl<'a> ToolReturnRecordInput<'a>
Sourcepub const fn new(
session_id: &'a SessionId,
run_id: &'a RunId,
tool_call_id: &'a str,
tool_name: &'a str,
metadata: &'a Metadata,
) -> Self
pub const fn new( session_id: &'a SessionId, run_id: &'a RunId, tool_call_id: &'a str, tool_name: &'a str, metadata: &'a Metadata, ) -> Self
Create record input from durable ids and tool-return fields.
Sourcepub const fn with_trace_context(self, trace_context: &'a TraceContext) -> Self
pub const fn with_trace_context(self, trace_context: &'a TraceContext) -> Self
Attach trace context to generated records.
Sourcepub fn with_policy(self, policy: Value) -> Self
pub fn with_policy(self, policy: Value) -> Self
Attach host policy metadata to generated records.
Auto Trait Implementations§
impl<'a> Freeze for ToolReturnRecordInput<'a>
impl<'a> RefUnwindSafe for ToolReturnRecordInput<'a>
impl<'a> Send for ToolReturnRecordInput<'a>
impl<'a> Sync for ToolReturnRecordInput<'a>
impl<'a> Unpin for ToolReturnRecordInput<'a>
impl<'a> UnsafeUnpin for ToolReturnRecordInput<'a>
impl<'a> UnwindSafe for ToolReturnRecordInput<'a>
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