#[non_exhaustive]pub struct ApiError {
pub status: u16,
pub code: String,
pub message: String,
pub reference_id: Option<String>,
pub retryable: bool,
pub details: Option<Object>,
pub retry_after: Option<Duration>,
pub headers: HeaderMap,
}Expand description
An error response from the API.
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.status: u16The HTTP status.
code: StringThe machine-readable code, for example OPERATION_INPUT_INVALID.
message: StringThe human-readable message.
reference_id: Option<String>The reference id to quote to support.
retryable: boolWhether the API says the same request may succeed later.
details: Option<Object>Structured details, when the API sends them.
retry_after: Option<Duration>The parsed Retry-After header.
headers: HeaderMapThe response headers.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ApiError
impl Freeze for ApiError
impl Move for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe for ApiError
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