#[non_exhaustive]pub enum TurnErrorKind {
Execution,
MaxTurns,
MaxBudget,
StructuredOutputRetries,
Api,
SessionClosed,
Cancelled,
Other(String),
}Expand description
Why a turn failed. Source: binary result error-subtype enum
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.
Execution
error_during_execution: includes interrupted turns.
MaxTurns
error_max_turns: SessionOptions::max_turns reached.
MaxBudget
error_max_budget_usd: SessionOptions::max_budget_usd reached.
StructuredOutputRetries
error_max_structured_output_retries.
Api
The API call failed (is_error on a success result).
SessionClosed
The CLI exited before the turn ended.
Cancelled
The prompt was withdrawn before it ran (Session::cancel_prompt,
Session::interrupt_all).
Other(String)
A subtype this SDK does not know.
Trait Implementations§
Source§impl Clone for TurnErrorKind
impl Clone for TurnErrorKind
Source§impl Debug for TurnErrorKind
impl Debug for TurnErrorKind
impl Eq for TurnErrorKind
Source§impl PartialEq for TurnErrorKind
impl PartialEq for TurnErrorKind
impl StructuralPartialEq for TurnErrorKind
Auto Trait Implementations§
impl Forget for TurnErrorKind
impl Freeze for TurnErrorKind
impl Move for TurnErrorKind
impl RefUnwindSafe for TurnErrorKind
impl Send for TurnErrorKind
impl Sync for TurnErrorKind
impl Unpin for TurnErrorKind
impl UnsafeUnpin for TurnErrorKind
impl UnwindSafe for TurnErrorKind
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