pub struct ApiErrorPayload {
pub message: String,
pub error_type: Option<String>,
pub param: Option<String>,
pub code: Option<String>,
}Expand description
Detailed error payload returned by OpenAI-compatible endpoints.
Fields§
§message: StringHuman-readable description of the error.
error_type: Option<String>Error category or classification (e.g. invalid_request_error).
param: Option<String>Specific parameter that caused the error, if applicable.
code: Option<String>Machine-readable error code (e.g. rate_limit_exceeded or OpenRouter numeric codes).
Trait Implementations§
Source§impl Clone for ApiErrorPayload
impl Clone for ApiErrorPayload
Source§fn clone(&self) -> ApiErrorPayload
fn clone(&self) -> ApiErrorPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApiErrorPayload
impl Debug for ApiErrorPayload
Source§impl<'de> Deserialize<'de> for ApiErrorPayload
impl<'de> Deserialize<'de> for ApiErrorPayload
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 ApiErrorPayload
Source§impl PartialEq for ApiErrorPayload
impl PartialEq for ApiErrorPayload
Source§impl Serialize for ApiErrorPayload
impl Serialize for ApiErrorPayload
impl StructuralPartialEq for ApiErrorPayload
Auto Trait Implementations§
impl Freeze for ApiErrorPayload
impl RefUnwindSafe for ApiErrorPayload
impl Send for ApiErrorPayload
impl Sync for ApiErrorPayload
impl Unpin for ApiErrorPayload
impl UnsafeUnpin for ApiErrorPayload
impl UnwindSafe for ApiErrorPayload
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