pub enum QueryCriteria {
Name(String),
Description(String),
HasParameter(String),
MinParameters(usize),
MaxParameters(usize),
And(Vec<QueryCriteria>),
Or(Vec<QueryCriteria>),
Not(Box<QueryCriteria>),
}Expand description
Query criteria for filtering tools
Variants§
Name(String)
Match tools by name (supports wildcards)
Description(String)
Match tools by description keyword
HasParameter(String)
Match tools with specific parameter
MinParameters(usize)
Match tools with at least N parameters
MaxParameters(usize)
Match tools with at most N parameters
And(Vec<QueryCriteria>)
Combine criteria with AND
Or(Vec<QueryCriteria>)
Combine criteria with OR
Not(Box<QueryCriteria>)
Negate a criteria
Implementations§
Source§impl QueryCriteria
impl QueryCriteria
Sourcepub fn matches(&self, tool: &ToolDefinition) -> bool
pub fn matches(&self, tool: &ToolDefinition) -> bool
Check if a tool matches this criteria
Trait Implementations§
Source§impl Clone for QueryCriteria
impl Clone for QueryCriteria
Source§fn clone(&self) -> QueryCriteria
fn clone(&self) -> QueryCriteria
Returns a duplicate of the value. Read more
1.0.0 · 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 QueryCriteria
impl Debug for QueryCriteria
Source§impl<'de> Deserialize<'de> for QueryCriteria
impl<'de> Deserialize<'de> for QueryCriteria
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QueryCriteria
impl RefUnwindSafe for QueryCriteria
impl Send for QueryCriteria
impl Sync for QueryCriteria
impl Unpin for QueryCriteria
impl UnsafeUnpin for QueryCriteria
impl UnwindSafe for QueryCriteria
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