pub enum StructuredError {
Deserialize(Error),
Api(ApiError),
}Expand description
Errors raised by the structured-output machinery.
Variants§
Deserialize(Error)
The model’s output did not deserialize into the target type.
Carries the underlying serde_json::Error with its exact location
(line/column within the JSON). This typically means the model returned
valid JSON but with missing fields, wrong types, or unexpected
structure relative to T’s schema.
Api(ApiError)
The provider API call failed (HTTP error, auth failure, timeout, rate limit).
Carries the underlying ApiError.
Trait Implementations§
Source§impl Debug for StructuredError
impl Debug for StructuredError
Source§impl Display for StructuredError
impl Display for StructuredError
Source§impl Error for StructuredError
impl Error for StructuredError
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 StructuredError
impl !UnwindSafe for StructuredError
impl Freeze for StructuredError
impl Send for StructuredError
impl Sync for StructuredError
impl Unpin for StructuredError
impl UnsafeUnpin for StructuredError
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