pub enum Tool {
Show 15 variants
Read,
Write,
Edit,
Bash,
Glob,
Grep,
Task,
WebFetch,
WebSearch,
NotebookEdit,
AskUserQuestion,
TodoWrite,
KillShell,
TaskOutput,
Skill,
}Expand description
Canonical tool names as an enum for type safety.
These match the actual tool names emitted by Claude Code in JSONL output. Using an enum provides compile-time checking and prevents typos.
§Example
use aptitude::Tool;
let tool = Tool::Read;
assert_eq!(tool.as_str(), "Read");Variants§
Read
Read a file
Write
Write a file
Edit
Edit a file
Bash
Execute a bash command
Glob
Search for files using glob patterns
Grep
Search file contents using grep/regex
Task
Launch a subagent task
WebFetch
Fetch content from a URL
WebSearch
Search the web
NotebookEdit
Edit a Jupyter notebook cell
AskUserQuestion
Ask the user a question
TodoWrite
Write to the todo list
KillShell
Kill a background shell
TaskOutput
Get output from a background task
Skill
Execute a skill
Implementations§
Trait Implementations§
impl Copy for Tool
impl Eq for Tool
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
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
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§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.