pub struct ErrorContext { /* private fields */ }Expand description
Error context builder for better error reporting
Implementations§
Source§impl ErrorContext
impl ErrorContext
pub fn new() -> Self
pub fn with_tool(self, tool_name: impl Into<String>) -> Self
pub fn with_operation(self, operation: impl Into<String>) -> Self
pub fn tool_not_found(self) -> ToolError
pub fn invalid_parameters(self, message: impl Into<String>) -> ToolError
pub fn execution_failed(self, message: impl Into<String>) -> ToolError
pub fn schema_validation(self, message: impl Into<String>) -> ToolError
pub fn serialization_error(self, source: Error) -> ToolError
pub fn timeout_error(self, timeout: Duration) -> ToolError
pub fn retry_limit_exceeded(self, attempts: u32) -> ToolError
pub fn validation_error( self, field: impl Into<String>, message: impl Into<String>, ) -> ToolError
pub fn concurrent_access_error(self, message: impl Into<String>) -> ToolError
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorContext
impl RefUnwindSafe for ErrorContext
impl Send for ErrorContext
impl Sync for ErrorContext
impl Unpin for ErrorContext
impl UnsafeUnpin for ErrorContext
impl UnwindSafe for ErrorContext
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