pub struct AxeneError {
pub status: u16,
pub code: Option<String>,
pub message: String,
}Expand description
Raised for any non-2xx API response, or for a transport failure that survives all retries.
Inspect AxeneError::status and AxeneError::code to branch on
specific failures (for example a 422 with code "invalid"). A status
of 0 indicates a transport/network failure with no HTTP response.
Fields§
§status: u16HTTP status code. 0 indicates a transport/network failure (no response).
code: Option<String>Machine-readable error code from the API body, when present.
message: StringHuman-readable error message.
Implementations§
Source§impl AxeneError
impl AxeneError
Trait Implementations§
Source§impl Clone for AxeneError
impl Clone for AxeneError
Source§fn clone(&self) -> AxeneError
fn clone(&self) -> AxeneError
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 AxeneError
impl Debug for AxeneError
Source§impl Display for AxeneError
impl Display for AxeneError
Source§impl Error for AxeneError
impl Error for AxeneError
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 AxeneError
impl RefUnwindSafe for AxeneError
impl Send for AxeneError
impl Sync for AxeneError
impl Unpin for AxeneError
impl UnsafeUnpin for AxeneError
impl UnwindSafe for AxeneError
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