pub struct FilterToolCalls { /* private fields */ }Available on crate feature
server only.Expand description
Drops whole tool calls by tool name.
Both halves of a call are removed — TOOL_CALL_START, its TOOL_CALL_ARGS,
the TOOL_CALL_END, the TOOL_CALL_RESULT and any encrypted reasoning blob
attached to it — so what reaches the client is a stream that never mentions
the tool.
let mut filter = FilterToolCalls::deny(["secret_tool"]);
assert!(filter.transform(Event::tool_call_start("c1", "secret_tool")).is_empty());
assert!(filter.transform(Event::tool_call_args("c1", "{}")).is_empty());
assert_eq!(filter.transform(Event::tool_call_start("c2", "public")).len(), 1);Implementations§
Trait Implementations§
Source§impl Clone for FilterToolCalls
impl Clone for FilterToolCalls
Source§impl Debug for FilterToolCalls
impl Debug for FilterToolCalls
Source§impl StreamTransformer for FilterToolCalls
impl StreamTransformer for FilterToolCalls
Auto Trait Implementations§
impl Forget for FilterToolCalls
impl Freeze for FilterToolCalls
impl Move for FilterToolCalls
impl RefUnwindSafe for FilterToolCalls
impl Send for FilterToolCalls
impl Sync for FilterToolCalls
impl Unpin for FilterToolCalls
impl UnsafeUnpin for FilterToolCalls
impl UnwindSafe for FilterToolCalls
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