pub struct ApiResponseError {
pub operation_id: &'static str,
pub status: u16,
pub code: Option<String>,
pub description: Option<String>,
pub request_id: Option<String>,
pub retry_after_seconds: Option<u64>,
pub body: Option<Value>,
/* private fields */
}Expand description
The service answered with a non-2xx status. It holds the status, the server’s error code and the request id, never the request, a header or a credential.
Fields§
§operation_id: &'static str§status: u16§code: Option<String>The error (OAuth-style) or detail (service envelope) field, when the body had one.
description: Option<String>§request_id: Option<String>§retry_after_seconds: Option<u64>§body: Option<Value>The parsed JSON error body when there was one (at most 64 KiB).
Trait Implementations§
Source§impl Clone for ApiResponseError
impl Clone for ApiResponseError
Source§fn clone(&self) -> ApiResponseError
fn clone(&self) -> ApiResponseError
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 ApiResponseError
impl Debug for ApiResponseError
Source§impl Display for ApiResponseError
impl Display for ApiResponseError
Source§impl Error for ApiResponseError
impl Error for ApiResponseError
1.30.0 · 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 Freeze for ApiResponseError
impl RefUnwindSafe for ApiResponseError
impl Send for ApiResponseError
impl Sync for ApiResponseError
impl Unpin for ApiResponseError
impl UnsafeUnpin for ApiResponseError
impl UnwindSafe for ApiResponseError
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