pub enum ApiError {
Show 18 variants
BadRequestError {
message: String,
code: Option<String>,
error: Option<String>,
},
UnauthorizedError {
message: String,
code: Option<String>,
error: Option<String>,
},
NotFoundError {
message: String,
code: Option<String>,
error: Option<String>,
},
ConflictError {
message: String,
code: Option<String>,
error: Option<String>,
},
TooManyRequestsError {
message: String,
code: Option<String>,
error: Option<String>,
},
InternalServerError {
message: String,
code: Option<String>,
error: Option<String>,
},
BadGatewayError {
message: String,
code: Option<String>,
error: Option<String>,
},
ServiceUnavailableError {
message: String,
code: Option<String>,
error: Option<String>,
},
Http {
status: u16,
message: String,
},
Network(Error),
Executor(Box<dyn Error + Send + Sync>),
Serialization(Error),
Configuration(String),
InvalidHeader,
RequestClone,
StreamTerminated,
StreamTimeout,
SseParseError(String),
}Variants§
BadRequestError
Fields
NotFoundError
ConflictError
TooManyRequestsError
InternalServerError
BadGatewayError
Http
Network(Error)
Executor(Box<dyn Error + Send + Sync>)
Serialization(Error)
Configuration(String)
InvalidHeader
RequestClone
StreamTerminated
StreamTimeout
SseParseError(String)
Implementations§
Trait Implementations§
Source§impl Error for ApiError
impl Error for ApiError
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 !RefUnwindSafe for ApiError
impl !UnwindSafe for ApiError
impl Freeze for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin 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