pub enum OpenPxError {
Network(NetworkError),
Exchange(ExchangeError),
WebSocket(WebSocketError),
Signing(SigningError),
RateLimitExceeded,
Serialization(Error),
Config(String),
InvalidInput(String),
Other(String),
}Variants§
Network(NetworkError)
Exchange(ExchangeError)
WebSocket(WebSocketError)
Signing(SigningError)
RateLimitExceeded
Serialization(Error)
Config(String)
InvalidInput(String)
Other(String)
Implementations§
Source§impl OpenPxError
impl OpenPxError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether this error is transient and the operation can be retried.
Sourcepub fn retry_after(&self) -> Option<Duration>
pub fn retry_after(&self) -> Option<Duration>
Suggested delay before retrying, if applicable.
Trait Implementations§
Source§impl Debug for OpenPxError
impl Debug for OpenPxError
Source§impl Display for OpenPxError
impl Display for OpenPxError
Source§impl Error for OpenPxError
impl Error for OpenPxError
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<Error> for OpenPxError
impl From<Error> for OpenPxError
Source§impl From<ExchangeError> for OpenPxError
impl From<ExchangeError> for OpenPxError
Source§fn from(source: ExchangeError) -> Self
fn from(source: ExchangeError) -> Self
Converts to this type from the input type.
Source§impl From<NetworkError> for OpenPxError
impl From<NetworkError> for OpenPxError
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Source§impl From<SigningError> for OpenPxError
impl From<SigningError> for OpenPxError
Source§fn from(source: SigningError) -> Self
fn from(source: SigningError) -> Self
Converts to this type from the input type.
Source§impl From<WebSocketError> for OpenPxError
impl From<WebSocketError> for OpenPxError
Source§fn from(source: WebSocketError) -> Self
fn from(source: WebSocketError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpenPxError
impl !RefUnwindSafe for OpenPxError
impl Send for OpenPxError
impl Sync for OpenPxError
impl Unpin for OpenPxError
impl UnsafeUnpin for OpenPxError
impl !UnwindSafe for OpenPxError
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