#[non_exhaustive]pub enum StreamErrorKind {
Throttled,
ContextWindowExceeded,
Auth,
Network,
ContentFiltered,
}Expand description
Structured classification of stream errors.
Adapters can attach a StreamErrorKind to an Error event so the agent
loop can classify errors structurally instead of relying on string matching.
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.
Throttled
The provider throttled the request (HTTP 429 / rate limit).
ContextWindowExceeded
The request exceeded the model’s context window.
Auth
Authentication or authorization failure (HTTP 401/403).
Network
Transient network or server error (connection drop, 5xx, etc.).
ContentFiltered
Provider safety/content filter blocked the response.
Trait Implementations§
Source§impl Clone for StreamErrorKind
impl Clone for StreamErrorKind
Source§fn clone(&self) -> StreamErrorKind
fn clone(&self) -> StreamErrorKind
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 StreamErrorKind
impl Debug for StreamErrorKind
Source§impl<'de> Deserialize<'de> for StreamErrorKind
impl<'de> Deserialize<'de> for StreamErrorKind
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
Source§impl PartialEq for StreamErrorKind
impl PartialEq for StreamErrorKind
Source§impl Serialize for StreamErrorKind
impl Serialize for StreamErrorKind
impl Copy for StreamErrorKind
impl Eq for StreamErrorKind
impl StructuralPartialEq for StreamErrorKind
Auto Trait Implementations§
impl Freeze for StreamErrorKind
impl RefUnwindSafe for StreamErrorKind
impl Send for StreamErrorKind
impl Sync for StreamErrorKind
impl Unpin for StreamErrorKind
impl UnsafeUnpin for StreamErrorKind
impl UnwindSafe for StreamErrorKind
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