ToolErrorContext

Trait ToolErrorContext 

Source
pub trait ToolErrorContext<T, E> {
    // Required method
    fn with_tool_context(
        self,
        tool_name: &str,
        operation: &str,
    ) -> Result<T, String>;
}
Expand description

Extension trait for adding tool context to errors

This trait provides a convenient way to add context when propagating errors through the ? operator.

Required Methods§

Source

fn with_tool_context( self, tool_name: &str, operation: &str, ) -> Result<T, String>

Add tool context to an error

§Arguments
  • tool_name - Name of the tool
  • operation - Description of the operation being performed

Implementations on Foreign Types§

Source§

impl<T, E: Display> ToolErrorContext<T, E> for Result<T, E>

Source§

fn with_tool_context( self, tool_name: &str, operation: &str, ) -> Result<T, String>

Implementors§