pub enum BybitError {
Show 18 variants
BybitError(BybitContentError),
ChannelSendError {
underlying: String,
},
ValidationError(String),
KlineValueMissingError {
index: usize,
name: &'static str,
},
ReqError(Error),
InvalidHeaderError(InvalidHeaderValue),
IoError(Error),
ParseFloatError(ParseFloatError),
UrlParserError(ParseError),
Json(Error),
Tungstenite(Error),
TimestampError(SystemTimeError),
SerdeError(Error),
InternalServerError,
ServiceUnavailable,
Unauthorized,
StatusCode(u16),
Base(String),
}Expand description
BybitError is an enum that can hold any possible error that can occur during the execution of the program. It has several variants, each representing a different type of error.
Variants§
BybitError(BybitContentError)
BybitError variant that holds a BybitContentError. This is used when the error returned by the Bybit API is of the type BybitContentError.
ChannelSendError
ValidationError(String)
ValidationError variant that holds a validation error message. This variant is used when request parameters fail validation before being sent to the API.
KlineValueMissingError
KlineValueMissingError variant that holds the index of the missing value, and the name of the missing value. This variant is used when a value in a kline vector is missing.
ReqError(Error)
Variants that hold the error returned by reqwest, serde_json, tokio_tungstenite, and std libraries. These variants are used when the respective library returns an error.
InvalidHeaderError(InvalidHeaderValue)
IoError(Error)
ParseFloatError(ParseFloatError)
UrlParserError(ParseError)
Json(Error)
Tungstenite(Error)
TimestampError(SystemTimeError)
SerdeError(Error)
InternalServerError
StatusCode(u16)
StatusCode variant that holds the status code.
Base(String)
Base variant that holds a String representing the error. This variant is used when the error is not of any specific type, and it is just a simple String.