pub struct ToolRunRequest<'a> {
pub task: &'a AgentTask,
pub tool_calls: Vec<ToolCall>,
pub context: &'a mut ToolContext,
pub messages: &'a mut Vec<Message>,
pub cycle_record: &'a mut CycleRecord,
pub interruption_provider: Option<&'a dyn Fn() -> Vec<Message>>,
pub on_tool_result: Option<&'a mut ToolResultCallback<'a>>,
pub execution_context: Option<&'a ExecutionContext>,
}Fields§
§task: &'a AgentTask§tool_calls: Vec<ToolCall>§context: &'a mut ToolContext§messages: &'a mut Vec<Message>§cycle_record: &'a mut CycleRecord§interruption_provider: Option<&'a dyn Fn() -> Vec<Message>>§on_tool_result: Option<&'a mut ToolResultCallback<'a>>§execution_context: Option<&'a ExecutionContext>Implementations§
Source§impl<'a> ToolRunRequest<'a>
impl<'a> ToolRunRequest<'a>
pub fn new( task: &'a AgentTask, tool_calls: Vec<ToolCall>, context: &'a mut ToolContext, messages: &'a mut Vec<Message>, cycle_record: &'a mut CycleRecord, ) -> Self
pub fn with_interruption_provider( self, provider: &'a dyn Fn() -> Vec<Message>, ) -> Self
pub fn with_tool_result_callback( self, callback: &'a mut ToolResultCallback<'a>, ) -> Self
pub fn with_execution_context( self, execution_context: &'a ExecutionContext, ) -> Self
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ToolRunRequest<'a>
impl<'a> !Send for ToolRunRequest<'a>
impl<'a> !Sync for ToolRunRequest<'a>
impl<'a> !UnwindSafe for ToolRunRequest<'a>
impl<'a> Freeze for ToolRunRequest<'a>
impl<'a> Unpin for ToolRunRequest<'a>
impl<'a> UnsafeUnpin for ToolRunRequest<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.