pub struct PreToolUseContext<'a> {
pub turn: TurnIdentity<'a>,
pub events: &'a mut Vec<EventMsg>,
/* private fields */
}Expand description
Mutable policy boundary for one normalized model-requested tool call.
Fields§
§turn: TurnIdentity<'a>§events: &'a mut Vec<EventMsg>Implementations§
Source§impl PreToolUseContext<'_>
impl PreToolUseContext<'_>
Sourcepub fn replace(
&mut self,
name: impl Into<String>,
arguments: Value,
) -> Result<()>
pub fn replace( &mut self, name: impl Into<String>, arguments: Value, ) -> Result<()>
Replaces the tool name and arguments while preserving the provider call ID.
Sourcepub fn push_input(&mut self, item: Value)
pub fn push_input(&mut self, item: Value)
Adds durable provider-neutral context before this call at a tool-complete boundary.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PreToolUseContext<'a>
impl<'a> !UnwindSafe for PreToolUseContext<'a>
impl<'a> Freeze for PreToolUseContext<'a>
impl<'a> Send for PreToolUseContext<'a>
impl<'a> Sync for PreToolUseContext<'a>
impl<'a> Unpin for PreToolUseContext<'a>
impl<'a> UnsafeUnpin for PreToolUseContext<'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