pub enum ToolResult {
Search(SearchResult),
FileList(FileListResult),
FileContent(FileContentResult),
Edit(EditResult),
Bash(BashResult),
Glob(GlobResult),
TodoRead(TodoListResult),
TodoWrite(TodoWriteResult),
Fetch(FetchResult),
Agent(AgentResult),
External(ExternalResult),
Error(ToolError),
}Expand description
Core enum for all tool results
Variants§
Search(SearchResult)
FileList(FileListResult)
FileContent(FileContentResult)
Edit(EditResult)
Bash(BashResult)
Glob(GlobResult)
TodoRead(TodoListResult)
TodoWrite(TodoWriteResult)
Fetch(FetchResult)
Agent(AgentResult)
External(ExternalResult)
Error(ToolError)
Implementations§
Source§impl ToolResult
impl ToolResult
Sourcepub fn llm_format(&self) -> String
pub fn llm_format(&self) -> String
Format the result for LLM consumption
Sourcepub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Get the variant name as a string for metadata
Trait Implementations§
Source§impl Clone for ToolResult
impl Clone for ToolResult
Source§fn clone(&self) -> ToolResult
fn clone(&self) -> ToolResult
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 ToolResult
impl Debug for ToolResult
Source§impl<'de> Deserialize<'de> for ToolResult
impl<'de> Deserialize<'de> for ToolResult
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
Source§impl From<AstGrepResult> for ToolResult
impl From<AstGrepResult> for ToolResult
Source§fn from(r: AstGrepResult) -> Self
fn from(r: AstGrepResult) -> Self
Converts to this type from the input type.
Source§impl From<BashResult> for ToolResult
impl From<BashResult> for ToolResult
Source§fn from(r: BashResult) -> Self
fn from(r: BashResult) -> Self
Converts to this type from the input type.
Source§impl From<EditResult> for ToolResult
impl From<EditResult> for ToolResult
Source§fn from(r: EditResult) -> Self
fn from(r: EditResult) -> Self
Converts to this type from the input type.
Source§impl From<ExternalResult> for ToolResult
impl From<ExternalResult> for ToolResult
Source§fn from(r: ExternalResult) -> Self
fn from(r: ExternalResult) -> Self
Converts to this type from the input type.
Source§impl From<FileContentResult> for ToolResult
impl From<FileContentResult> for ToolResult
Source§fn from(r: FileContentResult) -> Self
fn from(r: FileContentResult) -> Self
Converts to this type from the input type.
Source§impl From<FileListResult> for ToolResult
impl From<FileListResult> for ToolResult
Source§fn from(r: FileListResult) -> Self
fn from(r: FileListResult) -> Self
Converts to this type from the input type.
Source§impl From<GlobResult> for ToolResult
impl From<GlobResult> for ToolResult
Source§fn from(r: GlobResult) -> Self
fn from(r: GlobResult) -> Self
Converts to this type from the input type.
Source§impl From<GrepResult> for ToolResult
impl From<GrepResult> for ToolResult
Source§fn from(r: GrepResult) -> Self
fn from(r: GrepResult) -> Self
Converts to this type from the input type.
Source§impl From<MultiEditResult> for ToolResult
impl From<MultiEditResult> for ToolResult
Source§fn from(r: MultiEditResult) -> Self
fn from(r: MultiEditResult) -> Self
Converts to this type from the input type.
Source§impl From<ReplaceResult> for ToolResult
impl From<ReplaceResult> for ToolResult
Source§fn from(r: ReplaceResult) -> Self
fn from(r: ReplaceResult) -> Self
Converts to this type from the input type.
Source§impl From<TodoListResult> for ToolResult
impl From<TodoListResult> for ToolResult
Source§fn from(r: TodoListResult) -> Self
fn from(r: TodoListResult) -> Self
Converts to this type from the input type.
Source§impl From<TodoWriteResult> for ToolResult
impl From<TodoWriteResult> for ToolResult
Source§fn from(r: TodoWriteResult) -> Self
fn from(r: TodoWriteResult) -> Self
Converts to this type from the input type.
Source§impl From<ToolError> for ToolResult
impl From<ToolError> for ToolResult
Source§impl Serialize for ToolResult
impl Serialize for ToolResult
impl ToolOutput for ToolResult
Auto Trait Implementations§
impl Freeze for ToolResult
impl RefUnwindSafe for ToolResult
impl Send for ToolResult
impl Sync for ToolResult
impl Unpin for ToolResult
impl UnwindSafe for ToolResult
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