pub struct ToolErrorFeedback {
pub category: ToolErrorCategory,
pub message: String,
pub retryable: bool,
}Expand description
Structured error feedback injected as tool_result content for classified errors.
Provides the LLM with actionable information about what went wrong and what to
do next, replacing the opaque [error] ... string format.
Fields§
§category: ToolErrorCategory§message: String§retryable: boolImplementations§
Source§impl ToolErrorFeedback
impl ToolErrorFeedback
Sourcepub fn format_for_llm(&self) -> String
pub fn format_for_llm(&self) -> String
Format as a structured string for injection into tool_result content.
Trait Implementations§
Source§impl Clone for ToolErrorFeedback
impl Clone for ToolErrorFeedback
Source§fn clone(&self) -> ToolErrorFeedback
fn clone(&self) -> ToolErrorFeedback
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 ToolErrorFeedback
impl Debug for ToolErrorFeedback
Auto Trait Implementations§
impl Freeze for ToolErrorFeedback
impl RefUnwindSafe for ToolErrorFeedback
impl Send for ToolErrorFeedback
impl Sync for ToolErrorFeedback
impl Unpin for ToolErrorFeedback
impl UnsafeUnpin for ToolErrorFeedback
impl UnwindSafe for ToolErrorFeedback
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