pub struct ToolCallError { /* private fields */ }Expand description
Typed tool-call failure metadata.
Implementations§
Source§impl ToolCallError
impl ToolCallError
Sourcepub fn new(tool: ToolDefinition, underlying_error: impl Into<String>) -> Self
pub fn new(tool: ToolDefinition, underlying_error: impl Into<String>) -> Self
Create a tool-call error from the tool definition and underlying error text.
Sourcepub const fn tool(&self) -> &ToolDefinition
pub const fn tool(&self) -> &ToolDefinition
Borrow the tool definition that failed.
Sourcepub fn underlying_error(&self) -> &str
pub fn underlying_error(&self) -> &str
Borrow the underlying error text.
Trait Implementations§
Source§impl Clone for ToolCallError
impl Clone for ToolCallError
Source§fn clone(&self) -> ToolCallError
fn clone(&self) -> ToolCallError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolCallError
impl Debug for ToolCallError
Source§impl PartialEq for ToolCallError
impl PartialEq for ToolCallError
Source§fn eq(&self, other: &ToolCallError) -> bool
fn eq(&self, other: &ToolCallError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ToolCallError
impl StructuralPartialEq for ToolCallError
Auto Trait Implementations§
impl Freeze for ToolCallError
impl RefUnwindSafe for ToolCallError
impl Send for ToolCallError
impl Sync for ToolCallError
impl Unpin for ToolCallError
impl UnsafeUnpin for ToolCallError
impl UnwindSafe for ToolCallError
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