pub struct BeforeToolExecuteContext<'s, 'a> { /* private fields */ }Implementations§
Source§impl<'s, 'a> BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> BeforeToolExecuteContext<'s, 'a>
pub fn new(step: &'s mut StepContext<'a>) -> Self
Source§impl<'s, 'a> BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> BeforeToolExecuteContext<'s, 'a>
pub fn tool_name(&self) -> Option<&str>
pub fn tool_call_id(&self) -> Option<&str>
pub fn tool_args(&self) -> Option<&Value>
Sourcepub fn resume_input(&self) -> Option<ToolCallResume>
pub fn resume_input(&self) -> Option<ToolCallResume>
Resume payload attached to current tool call, if present.
pub fn decision(&self) -> ToolCallAction
pub fn set_decision(&mut self, decision: ToolCallAction)
pub fn block(&mut self, reason: impl Into<String>)
Sourcepub fn allow(&mut self)
pub fn allow(&mut self)
Explicitly allow tool execution.
This clears any previous block/suspend state set by earlier plugins.
Sourcepub fn set_tool_result(&mut self, result: ToolResult)
pub fn set_tool_result(&mut self, result: ToolResult)
Override current call result directly from plugin logic.
Useful for resumed frontend interactions where the external payload should become the tool result without executing a backend tool.
pub fn suspend(&mut self, ticket: SuspendTicket)
Trait Implementations§
Source§impl<'s, 'a> PhaseContext for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> PhaseContext for BeforeToolExecuteContext<'s, 'a>
Auto Trait Implementations§
impl<'s, 'a> Freeze for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> !RefUnwindSafe for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> Send for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> !Sync for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> Unpin for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> UnsafeUnpin for BeforeToolExecuteContext<'s, 'a>
impl<'s, 'a> !UnwindSafe for BeforeToolExecuteContext<'s, '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