pub enum BithumbError {
Show 14 variants
Authentication {
message: SmartString,
},
InvalidSymbol {
symbol: SmartString,
},
Connection {
message: SmartString,
},
Api {
code: SmartString,
message: SmartString,
},
OrderOperation {
operation: SmartString,
reason: SmartString,
},
InvalidOrderStatus {
status: SmartString,
},
RateLimit {
message: SmartString,
},
InsufficientBalance {
currency: SmartString,
required: SmartString,
available: SmartString,
},
InvalidMarketType {
market_type: SmartString,
},
WebSocketConnection {
message: SmartString,
},
JsonParsing {
message: SmartString,
},
Configuration {
message: SmartString,
},
Timeout {
timeout_ms: u64,
},
Internal {
message: SmartString,
},
}Expand description
Bithumb-specific error types
Variants§
Authentication
Authentication failed
Fields
message: SmartStringError message describing the authentication failure
InvalidSymbol
Invalid symbol format
Fields
symbol: SmartStringThe invalid symbol that was provided
Connection
Connection failed
Fields
message: SmartStringError message describing the connection failure
Api
API error from Bithumb
Fields
code: SmartStringError code returned by the API
message: SmartStringError message returned by the API
OrderOperation
Order operation failed
Fields
operation: SmartStringThe operation that failed (e.g., place_order, cancel_order)
reason: SmartStringThe reason for the failure
InvalidOrderStatus
Invalid order status
Fields
status: SmartStringThe invalid order status received
RateLimit
Rate limit exceeded
Fields
message: SmartStringMessage describing the rate limit violation
InsufficientBalance
Insufficient balance
Fields
currency: SmartStringThe currency for which balance is insufficient
required: SmartStringThe required amount
available: SmartStringThe available amount
InvalidMarketType
Invalid market type
Fields
market_type: SmartStringThe invalid market type provided
WebSocketConnection
WebSocket connection error
Fields
message: SmartStringError message describing the WebSocket connection issue
JsonParsing
JSON parsing error
Fields
message: SmartStringError message describing the JSON parsing issue
Configuration
Configuration error
Fields
message: SmartStringError message describing the configuration issue
Timeout
Network timeout
Internal
Internal system error
Fields
message: SmartStringError message describing the internal system issue
Implementations§
Source§impl BithumbError
Helper functions for creating common errors
impl BithumbError
Helper functions for creating common errors
Sourcepub fn invalid_symbol(symbol: impl Into<SmartString>) -> Self
pub fn invalid_symbol(symbol: impl Into<SmartString>) -> Self
Create invalid symbol error
Sourcepub fn connection(message: impl Into<SmartString>) -> Self
pub fn connection(message: impl Into<SmartString>) -> Self
Create connection error
Sourcepub fn api(
code: impl Into<SmartString>,
message: impl Into<SmartString>,
) -> Self
pub fn api( code: impl Into<SmartString>, message: impl Into<SmartString>, ) -> Self
Create API error
Sourcepub fn order_operation(
operation: impl Into<SmartString>,
reason: impl Into<SmartString>,
) -> Self
pub fn order_operation( operation: impl Into<SmartString>, reason: impl Into<SmartString>, ) -> Self
Create order operation error
Sourcepub fn invalid_order_status(status: impl Into<SmartString>) -> Self
pub fn invalid_order_status(status: impl Into<SmartString>) -> Self
Create invalid order status error
Sourcepub fn rate_limit(message: impl Into<SmartString>) -> Self
pub fn rate_limit(message: impl Into<SmartString>) -> Self
Create rate limit error
Sourcepub fn insufficient_balance(
currency: impl Into<SmartString>,
required: impl Into<SmartString>,
available: impl Into<SmartString>,
) -> Self
pub fn insufficient_balance( currency: impl Into<SmartString>, required: impl Into<SmartString>, available: impl Into<SmartString>, ) -> Self
Create insufficient balance error
Sourcepub fn json_parsing(message: impl Into<SmartString>) -> Self
pub fn json_parsing(message: impl Into<SmartString>) -> Self
Create JSON parsing error
Sourcepub fn configuration(message: impl Into<SmartString>) -> Self
pub fn configuration(message: impl Into<SmartString>) -> Self
Create configuration error
Trait Implementations§
Source§impl Debug for BithumbError
impl Debug for BithumbError
Source§impl Display for BithumbError
impl Display for BithumbError
Source§impl Error for BithumbError
impl Error for BithumbError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<BithumbError> for EMSError
impl From<BithumbError> for EMSError
Source§fn from(err: BithumbError) -> Self
fn from(err: BithumbError) -> Self
Auto Trait Implementations§
impl Freeze for BithumbError
impl RefUnwindSafe for BithumbError
impl Send for BithumbError
impl Sync for BithumbError
impl Unpin for BithumbError
impl UnwindSafe for BithumbError
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
§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>
§impl<T> Pointable for T
impl<T> Pointable for T
§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.