#[non_exhaustive]pub enum StructuredOutputError {
TurnFailed {
message: Option<String>,
},
NoTerminal,
Missing,
InvalidJson(Error),
NotObjectOrArray,
Decode(Error),
}Expand description
Why a run’s structured output could not be decoded.
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.
TurnFailed
The turn ended with turn.failed. message is the native failure
message, when present.
NoTerminal
The event stream had no turn.completed event.
Missing
The final turn had no agent message, or its text was empty or null.
InvalidJson(Error)
The final agent message was not valid JSON.
NotObjectOrArray
The final agent message was JSON, but neither an object nor an array.
Decode(Error)
The JSON did not deserialize into the requested type.
Trait Implementations§
Source§impl Debug for StructuredOutputError
impl Debug for StructuredOutputError
Source§impl Display for StructuredOutputError
impl Display for StructuredOutputError
Source§impl Error for StructuredOutputError
impl Error for StructuredOutputError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for StructuredOutputError
impl !UnwindSafe for StructuredOutputError
impl Forget for StructuredOutputError
impl Freeze for StructuredOutputError
impl Send for StructuredOutputError
impl Sync for StructuredOutputError
impl Unpin for StructuredOutputError
impl UnsafeUnpin for StructuredOutputError
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