#[non_exhaustive]pub struct ApiErrorBody {
pub message: String,
pub type: Option<String>,
pub code: Option<String>,
pub param: Option<String>,
}Expand description
EN: Structured OpenAI error body fields. 中文:结构化的 OpenAI 错误响应体字段。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: StringEN: Human-readable OpenAI error message. 中文:OpenAI 返回的可读错误消息。
type: Option<String>EN: OpenAI error type, when present. 中文:OpenAI 错误类型,如响应中存在。
code: Option<String>EN: OpenAI error code, when present. 中文:OpenAI 错误代码,如响应中存在。
param: Option<String>EN: Request parameter associated with the error, when present. 中文:与错误关联的请求参数,如响应中存在。
Trait Implementations§
Source§impl Clone for ApiErrorBody
impl Clone for ApiErrorBody
Source§fn clone(&self) -> ApiErrorBody
fn clone(&self) -> ApiErrorBody
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 ApiErrorBody
impl Debug for ApiErrorBody
Source§impl<'de> Deserialize<'de> for ApiErrorBody
impl<'de> Deserialize<'de> for ApiErrorBody
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 ApiErrorBody
Source§impl PartialEq for ApiErrorBody
impl PartialEq for ApiErrorBody
Source§fn eq(&self, other: &ApiErrorBody) -> bool
fn eq(&self, other: &ApiErrorBody) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ApiErrorBody
impl Serialize for ApiErrorBody
impl StructuralPartialEq for ApiErrorBody
Auto Trait Implementations§
impl Freeze for ApiErrorBody
impl RefUnwindSafe for ApiErrorBody
impl Send for ApiErrorBody
impl Sync for ApiErrorBody
impl Unpin for ApiErrorBody
impl UnsafeUnpin for ApiErrorBody
impl UnwindSafe for ApiErrorBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.