pub enum AfterToolCallResult {
Continue(Value),
}Available on crate feature
plugin only.Expand description
Result from an after_tool_call hook invocation.
After-tool hooks can only continue with a (possibly modified) result. Short-circuiting is not supported for after-hooks since the operation has already completed.
§Examples
use adk_plugin::AfterToolCallResult;
use serde_json::json;
// Pass through the tool result unchanged
let tool_output = json!({"status": "success", "data": [1, 2, 3]});
let result = AfterToolCallResult::Continue(tool_output);
// Or modify the result (e.g., add metadata)
let enriched = json!({"status": "success", "data": [1, 2, 3], "cached": false});
let result = AfterToolCallResult::Continue(enriched);Variants§
Continue(Value)
Continue with (possibly modified) result.
The contained value will be passed to the next plugin in the chain, and ultimately returned to the agent as the tool output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AfterToolCallResult
impl RefUnwindSafe for AfterToolCallResult
impl Send for AfterToolCallResult
impl Sync for AfterToolCallResult
impl Unpin for AfterToolCallResult
impl UnsafeUnpin for AfterToolCallResult
impl UnwindSafe for AfterToolCallResult
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