pub enum Error {
InvalidUrl(String),
QueueFull,
DriverGone,
WebSocket(Error),
Io(Error),
MissingCredentials,
NotConnected,
Timeout,
ConnectionLost,
Api {
code: i64,
msg: String,
},
InvalidReply(String),
}Expand description
Errors of the WebSocket driver and its Handle.
Variants§
InvalidUrl(String)
The stream URL is invalid.
QueueFull
The command queue is full (try_* methods of Handle).
DriverGone
The driver task has stopped.
WebSocket(Error)
WebSocket protocol or transport error.
Io(Error)
I/O error.
MissingCredentials
TradeClient needs api_key and
api_secret in the Config.
NotConnected
An order entry request was sent while the stream was not connected
and authenticated (TradeClient).
Timeout
No reply to an order entry request within the request timeout. The order may or may not have been accepted: check it before retrying.
ConnectionLost
The connection was lost before the reply arrived. The order may or may not have been accepted: check it before retrying.
Api
Bybit rejected the request (see ret_code).
InvalidReply(String)
The reply data could not be parsed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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