pub struct ToolFailure {
pub kind: ToolFailureKind,
pub message: String,
pub attempts: u32,
}Expand description
A tool failure as recorded in (and decoded from) a completion output.
Fields§
§kind: ToolFailureKindWhich dispatch layer failed.
message: StringThe full error chain: the top error’s message and every source,
joined with ": ". Never truncated here; compaction happens only on
the way into model context.
attempts: u32How many times the call executed, counting retries.
Implementations§
Source§impl ToolFailure
impl ToolFailure
Sourcepub fn from_error(error: &ToolError, attempts: u32) -> Self
pub fn from_error(error: &ToolError, attempts: u32) -> Self
Builds a failure record from a dispatch error, capturing the full
source chain into message.
Trait Implementations§
Source§impl Clone for ToolFailure
impl Clone for ToolFailure
Source§fn clone(&self) -> ToolFailure
fn clone(&self) -> ToolFailure
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 ToolFailure
impl Debug for ToolFailure
impl Eq for ToolFailure
Source§impl PartialEq for ToolFailure
impl PartialEq for ToolFailure
impl StructuralPartialEq for ToolFailure
Auto Trait Implementations§
impl Freeze for ToolFailure
impl RefUnwindSafe for ToolFailure
impl Send for ToolFailure
impl Sync for ToolFailure
impl Unpin for ToolFailure
impl UnsafeUnpin for ToolFailure
impl UnwindSafe for ToolFailure
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.