#[non_exhaustive]pub enum ErrorClass {
Timeout,
RateLimit,
Auth,
Transport,
Validation,
ProviderServer,
Cancelled,
Unknown,
}Expand description
High-level classification of a prompt or tool failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Timeout
The request exceeded a deadline (connect, read, or overall).
RateLimit
The provider returned a rate-limit / quota signal (e.g. HTTP 429).
Auth
Authentication or authorization failed (e.g. HTTP 401/403).
Transport
A network/transport-level failure occurred before a usable response.
Validation
The request was rejected as invalid (e.g. HTTP 400, bad arguments).
ProviderServer
The provider reported a server-side error (e.g. HTTP 5xx).
Cancelled
The operation was cancelled before completion.
Unknown
The failure could not be classified into a more specific class.
Implementations§
Trait Implementations§
Source§impl Clone for ErrorClass
impl Clone for ErrorClass
Source§fn clone(&self) -> ErrorClass
fn clone(&self) -> ErrorClass
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 moreimpl Copy for ErrorClass
Source§impl Debug for ErrorClass
impl Debug for ErrorClass
Source§impl<'de> Deserialize<'de> for ErrorClass
impl<'de> Deserialize<'de> for ErrorClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ErrorClass
Source§impl PartialEq for ErrorClass
impl PartialEq for ErrorClass
Source§impl Serialize for ErrorClass
impl Serialize for ErrorClass
impl StructuralPartialEq for ErrorClass
Auto Trait Implementations§
impl Freeze for ErrorClass
impl RefUnwindSafe for ErrorClass
impl Send for ErrorClass
impl Sync for ErrorClass
impl Unpin for ErrorClass
impl UnsafeUnpin for ErrorClass
impl UnwindSafe for ErrorClass
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