pub struct AllowListFilter { /* private fields */ }Expand description
Only allows tools whose names are in the allow list.
Implementations§
Source§impl AllowListFilter
impl AllowListFilter
pub fn new(allowed: impl IntoIterator<Item = impl Into<String>>) -> Self
Trait Implementations§
Source§impl ToolFilter for AllowListFilter
impl ToolFilter for AllowListFilter
Source§fn filter(
&self,
tools: Vec<ToolDefinition>,
_context: &FilterContext,
) -> Vec<ToolDefinition>
fn filter( &self, tools: Vec<ToolDefinition>, _context: &FilterContext, ) -> Vec<ToolDefinition>
Filter the list of tool definitions based on the current context.
Auto Trait Implementations§
impl Freeze for AllowListFilter
impl RefUnwindSafe for AllowListFilter
impl Send for AllowListFilter
impl Sync for AllowListFilter
impl Unpin for AllowListFilter
impl UnsafeUnpin for AllowListFilter
impl UnwindSafe for AllowListFilter
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