pub enum ExchangeError {
Http(String),
Network(String),
RateLimited,
WouldExceedUserActionLimit {
retry_after_ms: u64,
needed: u32,
},
Unavailable,
Timeout,
Rejected(String),
Parse(String),
Signing(String),
Configuration(String),
Unknown(String),
}Expand description
Errors returned by exchange operations.
Variants§
Http(String)
HTTP status or response-level failure that does not fit a narrower case.
Network(String)
Network transport failure such as DNS, connection reset, or TLS failure.
RateLimited
Exchange rejected the request because a rate limit was hit.
WouldExceedUserActionLimit
Exchange action budget is too low for the requested batch.
Fields
Exchange is temporarily unavailable.
Timeout
Request exceeded its configured deadline.
Rejected(String)
Exchange accepted the request shape but rejected the order semantics.
Parse(String)
Adapter could not parse an exchange response.
Signing(String)
Request signing failed before submission.
Configuration(String)
Adapter was configured with invalid or missing settings.
Unknown(String)
Fallback for failures that should be made more specific when possible.
Implementations§
Source§impl ExchangeError
impl ExchangeError
Trait Implementations§
Source§impl Clone for ExchangeError
impl Clone for ExchangeError
Source§fn clone(&self) -> ExchangeError
fn clone(&self) -> ExchangeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExchangeError
impl Debug for ExchangeError
Source§impl Display for ExchangeError
impl Display for ExchangeError
Source§impl Error for ExchangeError
impl Error for ExchangeError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for ExchangeError
impl RefUnwindSafe for ExchangeError
impl Send for ExchangeError
impl Sync for ExchangeError
impl Unpin for ExchangeError
impl UnsafeUnpin for ExchangeError
impl UnwindSafe for ExchangeError
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