pub struct PostToolUseContext<'a> {
pub turn: TurnIdentity<'a>,
pub call: &'a ToolCall,
pub events: &'a mut Vec<EventMsg>,
/* private fields */
}Expand description
Mutable model-visible result exposed after an executed tool call.
Fields§
§turn: TurnIdentity<'a>§call: &'a ToolCall§events: &'a mut Vec<EventMsg>Implementations§
Source§impl PostToolUseContext<'_>
impl PostToolUseContext<'_>
Sourcepub fn result(&self) -> &ToolResult
pub fn result(&self) -> &ToolResult
Returns the result after any earlier middleware changes.
Sourcepub fn replace(&mut self, output: impl Into<String>)
pub fn replace(&mut self, output: impl Into<String>)
Replaces the feedback returned to the model without changing past side effects.
Sourcepub fn push_input(&mut self, item: Value)
pub fn push_input(&mut self, item: Value)
Adds provider-neutral context immediately after this tool output.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PostToolUseContext<'a>
impl<'a> !UnwindSafe for PostToolUseContext<'a>
impl<'a> Freeze for PostToolUseContext<'a>
impl<'a> Send for PostToolUseContext<'a>
impl<'a> Sync for PostToolUseContext<'a>
impl<'a> Unpin for PostToolUseContext<'a>
impl<'a> UnsafeUnpin for PostToolUseContext<'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