pub enum ErrorClass {
Transient,
Throttled,
ContextOverflow,
Fatal,
}Expand description
Provider-declared classification of a completion error, telling callers how to react. Classification is the provider’s job — it knows its own failure modes — so the agent runtime never has to parse error message strings.
Variants§
Transient
Transient failure (dropped stream, backend hiccup, request timeout); retrying the same request may succeed.
Throttled
Rate limited / throttled; retrying the same request may succeed after a longer backoff.
ContextOverflow
The request’s input does not fit the model’s context window; retrying the same request can never succeed. Callers must shrink the input (drop or truncate oversized messages, compact history).
Fatal
Permanent failure (bad request, unknown model, access denied); do not retry.
Trait Implementations§
Source§impl Clone for ErrorClass
impl Clone for ErrorClass
impl 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