pub enum RestError {
Show 20 variants
Api(i64, String),
Http(Error),
Hyper(Error),
Json(Error),
Urlencoded(Error),
Exchange(ExchangeError),
InvalidHeaderValue(InvalidHeaderValue),
UnexpectedResponseType(Error),
UnsupportedEndpoint(Error),
NeedApikey,
SignError(SignError),
Utf8(Utf8Error),
Text(String),
PlaceZeroSize,
ParseSymbol(ParseSymbolError),
FailedToBuildExcSymbol,
MissingDateForFutures,
InvalidDateForOptions,
MissingBaseAssetForOptions,
UnknownContractType(String),
}Expand description
Rest API Errors.
Variants§
Api(i64, String)
API error message.
Http(Error)
Http errors.
Hyper(Error)
Errors from hyper.
Json(Error)
Json errors.
Urlencoded(Error)
Urlencoded.
Exchange(ExchangeError)
Standard exchange errors.
InvalidHeaderValue(InvalidHeaderValue)
Invalid header value.
UnexpectedResponseType(Error)
Unexpected response type.
UnsupportedEndpoint(Error)
Unsupported endpoint.
NeedApikey
Need key.
SignError(SignError)
Sign error.
Utf8(Utf8Error)
Utf-8 error.
Text(String)
Text response.
PlaceZeroSize
Place Zero size.
ParseSymbol(ParseSymbolError)
Parse Symbol Error.
FailedToBuildExcSymbol
Failed to build exc symbol.
MissingDateForFutures
Missing date for futures.
InvalidDateForOptions
Invalid date for options.
MissingBaseAssetForOptions
Missing base asset for options.
UnknownContractType(String)
Unknown contract type.
Implementations§
Trait Implementations§
Source§impl Error for RestError
impl Error for RestError
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<ExchangeError> for RestError
impl From<ExchangeError> for RestError
Source§fn from(source: ExchangeError) -> Self
fn from(source: ExchangeError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for RestError
impl From<InvalidHeaderValue> for RestError
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<ParseSymbolError> for RestError
impl From<ParseSymbolError> for RestError
Source§fn from(source: ParseSymbolError) -> Self
fn from(source: ParseSymbolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RestError
impl !RefUnwindSafe for RestError
impl Send for RestError
impl Sync for RestError
impl Unpin for RestError
impl !UnwindSafe for RestError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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