pub enum BybitApiError {
Http {
status: Option<u16>,
message: String,
},
Api {
code: i64,
message: String,
},
Ws {
message: String,
},
Auth {
message: String,
},
Parse(String),
RateLimitExceeded,
Subscription {
message: String,
},
}Expand description
An error of a call to Bybit.
Variants§
Http
The transport failed, or the server answered a status that is not a success.
Fields
Api
The server answered HTTP 200 with a non-zero retCode: a refusal of the request itself.
Ws
The WebSocket failed.
Auth
The key pair was refused (HTTP 401, or a retCode of authentication: 10003, 10004, 10005, 10007, 10010).
Parse(String)
The answer is a success but is not the JSON that was expected.
RateLimitExceeded
The request rate limit: HTTP 429, or retCode 10006.
Subscription
A subscription could not be made.
Implementations§
Trait Implementations§
Source§impl Debug for BybitApiError
impl Debug for BybitApiError
Source§impl Display for BybitApiError
impl Display for BybitApiError
Source§impl Error for BybitApiError
impl Error for BybitApiError
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()
Source§impl From<Error> for BybitApiError
impl From<Error> for BybitApiError
Auto Trait Implementations§
impl Freeze for BybitApiError
impl RefUnwindSafe for BybitApiError
impl Send for BybitApiError
impl Sync for BybitApiError
impl Unpin for BybitApiError
impl UnsafeUnpin for BybitApiError
impl UnwindSafe for BybitApiError
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