#[non_exhaustive]pub enum ToolFailureKind {
InvalidArgs,
Timeout,
Cancelled,
NotFound,
PermissionDenied,
RateLimited,
Provider,
Network,
Other,
}Expand description
How a tool execution failed, as a closed set of standard kinds.
A hook, policy, or telemetry pipeline matches on this to make control-flow decisions (e.g. “terminate after repeated timeouts, but keep going on a 404”) without parsing the model-visible error string.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidArgs
The arguments could not be parsed or were rejected as invalid.
Timeout
The tool did not complete within its allotted time.
Cancelled
The tool call was cancelled (e.g. by an abort signal or a dropped future).
NotFound
The requested resource was not found (e.g. an HTTP 404).
PermissionDenied
The caller was not permitted to perform the action (e.g. an HTTP 401/403).
RateLimited
The tool was rate limited (e.g. an HTTP 429).
Provider
The upstream provider/service returned an error (e.g. an HTTP 5xx).
Network
A network/transport failure occurred before a response was received.
Other
Any failure that does not fit a more specific kind.
Implementations§
Trait Implementations§
Source§impl Clone for ToolFailureKind
impl Clone for ToolFailureKind
Source§fn clone(&self) -> ToolFailureKind
fn clone(&self) -> ToolFailureKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ToolFailureKind
Source§impl Debug for ToolFailureKind
impl Debug for ToolFailureKind
Source§impl Display for ToolFailureKind
impl Display for ToolFailureKind
impl Eq for ToolFailureKind
Source§impl Hash for ToolFailureKind
impl Hash for ToolFailureKind
Source§impl PartialEq for ToolFailureKind
impl PartialEq for ToolFailureKind
impl StructuralPartialEq for ToolFailureKind
Auto Trait Implementations§
impl Freeze for ToolFailureKind
impl RefUnwindSafe for ToolFailureKind
impl Send for ToolFailureKind
impl Sync for ToolFailureKind
impl Unpin for ToolFailureKind
impl UnsafeUnpin for ToolFailureKind
impl UnwindSafe for ToolFailureKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
impl<T> DebuggableStorage for T
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.