pub struct GrepTool<E: Environment> { /* private fields */ }Expand description
Tool for searching file contents using regex patterns
Implementations§
Source§impl<E: Environment> GrepTool<E>
impl<E: Environment> GrepTool<E>
pub const fn new(environment: Arc<E>, capabilities: AgentCapabilities) -> Self
Trait Implementations§
Source§impl<E: Environment + 'static> Tool<()> for GrepTool<E>
impl<E: Environment + 'static> Tool<()> for GrepTool<E>
Source§type Name = PrimitiveToolName
type Name = PrimitiveToolName
The type of name for this tool.
Source§fn name(&self) -> PrimitiveToolName
fn name(&self) -> PrimitiveToolName
Returns the tool’s strongly-typed name.
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable display name for UI (e.g., “Read File” vs “read”). Read more
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what the tool does.
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON schema for the tool’s input parameters.
Source§async fn execute(
&self,
_ctx: &ToolContext<()>,
input: Value,
) -> Result<ToolResult>
async fn execute( &self, _ctx: &ToolContext<()>, input: Value, ) -> Result<ToolResult>
Execute the tool with the given input. Read more
Auto Trait Implementations§
impl<E> Freeze for GrepTool<E>
impl<E> RefUnwindSafe for GrepTool<E>where
E: RefUnwindSafe,
impl<E> Send for GrepTool<E>
impl<E> Sync for GrepTool<E>
impl<E> Unpin for GrepTool<E>
impl<E> UnwindSafe for GrepTool<E>where
E: RefUnwindSafe,
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