pub enum ToolHookFilter {
None,
All,
Only(BTreeSet<ToolName>),
}Expand description
Filter selecting which tools trigger a tool-level hook point.
Variants§
None
No tools are subscribed; the hook point is skipped with zero overhead.
All
Every tool call triggers the hook point.
Only(BTreeSet<ToolName>)
Only tool calls whose name appears in this set trigger the hook point.
Implementations§
Source§impl ToolHookFilter
impl ToolHookFilter
Sourcepub fn matches(&self, tool_name: &ToolName) -> bool
pub fn matches(&self, tool_name: &ToolName) -> bool
Returns whether tool_name matches this filter.
Sourcepub fn union_with(&mut self, other: &ToolHookFilter)
pub fn union_with(&mut self, other: &ToolHookFilter)
Merges another filter into this filter using set union semantics.
Trait Implementations§
Source§impl Clone for ToolHookFilter
impl Clone for ToolHookFilter
Source§fn clone(&self) -> ToolHookFilter
fn clone(&self) -> ToolHookFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolHookFilter
impl Debug for ToolHookFilter
Source§impl Default for ToolHookFilter
impl Default for ToolHookFilter
Source§fn default() -> ToolHookFilter
fn default() -> ToolHookFilter
Returns the “default value” for a type. Read more
impl Eq for ToolHookFilter
Source§impl PartialEq for ToolHookFilter
impl PartialEq for ToolHookFilter
impl StructuralPartialEq for ToolHookFilter
Auto Trait Implementations§
impl Forget for ToolHookFilter
impl Freeze for ToolHookFilterwhere
*const LeafNode<ToolName, SetValZST> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(ToolName, SetValZST)>>: Freeze,
impl Move for ToolHookFilter
impl RefUnwindSafe for ToolHookFilter
impl Send for ToolHookFilter
impl Sync for ToolHookFilter
impl Unpin for ToolHookFilter
impl UnsafeUnpin for ToolHookFilterwhere
*const LeafNode<ToolName, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(ToolName, SetValZST)>>: UnsafeUnpin,
impl UnwindSafe for ToolHookFilter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.