pub enum BitmexHttpError {
MissingCredentials,
BitmexError {
error_name: String,
message: String,
},
JsonError(String),
ValidationError(String),
BuildError(BitmexBuildError),
Canceled(String),
NetworkError(String),
UnexpectedStatus {
status: StatusCode,
body: String,
},
}Expand description
A typed error enumeration for the BitMEX HTTP client.
Variants§
MissingCredentials
Error variant when credentials are missing but the request is authenticated.
BitmexError
Errors returned directly by BitMEX.
JsonError(String)
Failure during JSON serialization/deserialization.
ValidationError(String)
Parameter validation error.
BuildError(BitmexBuildError)
Build error for query parameters.
Canceled(String)
Request was canceled, typically due to shutdown or disconnect.
NetworkError(String)
Generic network error (for retries, cancellations, etc).
UnexpectedStatus
Any unknown HTTP status or unexpected response from BitMEX.
Trait Implementations§
Source§impl Clone for BitmexHttpError
impl Clone for BitmexHttpError
Source§fn clone(&self) -> BitmexHttpError
fn clone(&self) -> BitmexHttpError
Returns a duplicate of the value. Read more
1.0.0 · 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 BitmexHttpError
impl Debug for BitmexHttpError
Source§impl Display for BitmexHttpError
impl Display for BitmexHttpError
Source§impl Error for BitmexHttpError
impl Error for BitmexHttpError
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<BitmexBuildError> for BitmexHttpError
impl From<BitmexBuildError> for BitmexHttpError
Source§fn from(source: BitmexBuildError) -> Self
fn from(source: BitmexBuildError) -> Self
Converts to this type from the input type.
Source§impl From<BitmexErrorResponse> for BitmexHttpError
impl From<BitmexErrorResponse> for BitmexHttpError
Source§fn from(error: BitmexErrorResponse) -> Self
fn from(error: BitmexErrorResponse) -> Self
Converts to this type from the input type.
Source§impl From<BitmexHttpError> for PyErr
impl From<BitmexHttpError> for PyErr
Source§fn from(error: BitmexHttpError) -> Self
fn from(error: BitmexHttpError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for BitmexHttpError
impl From<Error> for BitmexHttpError
Source§impl From<HttpClientError> for BitmexHttpError
impl From<HttpClientError> for BitmexHttpError
Auto Trait Implementations§
impl Freeze for BitmexHttpError
impl RefUnwindSafe for BitmexHttpError
impl Send for BitmexHttpError
impl Sync for BitmexHttpError
impl Unpin for BitmexHttpError
impl UnwindSafe for BitmexHttpError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.