#[non_exhaustive]pub enum Error {
Show 14 variants
Invariant(&'static str),
InvalidInput(String),
RateLimited,
ProviderRateLimited,
ProviderRateLimitedInvariant {
source: Box<Error>,
},
Provider {
status: u16,
code: Option<String>,
message: Option<String>,
},
AmbiguousMutation {
account: AccountID,
},
ReconciliationRequired {
account: AccountID,
},
MutationInFlight {
account: AccountID,
},
Transport(String),
ResponseTooLarge,
IncompleteStreamRecord {
bytes: usize,
},
StreamAlreadyEnded,
Decode(String),
}Expand description
An OANDA client failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invariant(&'static str)
The client’s internal admission state is inconsistent.
InvalidInput(String)
Local input or environment is invalid.
RateLimited
Local query or stream capacity was exhausted.
ProviderRateLimited
Provider rate limited a request.
ProviderRateLimitedInvariant
HTTP 429 proves refusal, but the shared cooldown could not be installed.
Provider
The provider rejected the request definitively.
Fields
AmbiguousMutation
An I/O or decode outcome leaves a mutation uncertain.
ReconciliationRequired
This account requires explicit reconciliation before another mutation.
MutationInFlight
Another mutation for this account is still in flight.
Transport(String)
Transport failed before a response was available.
ResponseTooLarge
The response or stream record exceeds a configured bound.
IncompleteStreamRecord
A finite buffered cut ended inside an unterminated stream record.
StreamAlreadyEnded
The stream had ended before a buffered cut could be established.
Decode(String)
Provider response did not match the documented shape.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()