pub struct ToolCallPattern {
pub tool: ToolMatcher,
pub args: ArgMatcher,
}Expand description
A complete pattern matching tool calls by name and optionally by arguments.
Fields§
§tool: ToolMatcherTool name matcher (exact, glob, or regex).
args: ArgMatcherArgument matcher (any, primary, or named fields).
Implementations§
Source§impl ToolCallPattern
impl ToolCallPattern
Sourcepub fn tool(name: impl Into<String>) -> Self
pub fn tool(name: impl Into<String>) -> Self
Exact tool name, any args.
§Examples
use awaken_tool_pattern::ToolCallPattern;
let pattern = ToolCallPattern::tool("read_file");
assert_eq!(format!("{}", pattern), "read_file");Sourcepub fn tool_with_primary(
name: impl Into<String>,
pattern: impl Into<String>,
) -> Self
pub fn tool_with_primary( name: impl Into<String>, pattern: impl Into<String>, ) -> Self
Exact tool name with a primary glob pattern.
Sourcepub fn with_args(self, args: ArgMatcher) -> Self
pub fn with_args(self, args: ArgMatcher) -> Self
Set argument matcher.
Trait Implementations§
Source§impl Clone for ToolCallPattern
impl Clone for ToolCallPattern
Source§fn clone(&self) -> ToolCallPattern
fn clone(&self) -> ToolCallPattern
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 ToolCallPattern
impl Debug for ToolCallPattern
Source§impl<'de> Deserialize<'de> for ToolCallPattern
impl<'de> Deserialize<'de> for ToolCallPattern
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ToolCallPattern
impl Display for ToolCallPattern
impl Eq for ToolCallPattern
Source§impl PartialEq for ToolCallPattern
impl PartialEq for ToolCallPattern
Source§fn eq(&self, other: &ToolCallPattern) -> bool
fn eq(&self, other: &ToolCallPattern) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolCallPattern
impl Serialize for ToolCallPattern
impl StructuralPartialEq for ToolCallPattern
Auto Trait Implementations§
impl Freeze for ToolCallPattern
impl RefUnwindSafe for ToolCallPattern
impl Send for ToolCallPattern
impl Sync for ToolCallPattern
impl Unpin for ToolCallPattern
impl UnsafeUnpin for ToolCallPattern
impl UnwindSafe for ToolCallPattern
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