pub enum Error {
Validation(String),
Definition {
exchange_id: Ustr,
market_id: Ustr,
field: &'static str,
reason: &'static str,
},
Unavailable(InstrumentId),
Http {
status: u16,
retry_after_secs: Option<u64>,
},
Transport,
Timeout,
Configuration,
Parse {
line: usize,
column: usize,
},
Response(&'static str),
AttemptBudget,
Retry(RetryError),
}Expand description
A failure in prediction-market requests or instrument definitions.
Variants§
Validation(String)
Invalid request selectors, credentials, identity, or local controls.
Definition
Missing, unsupported, or conflicting instrument metadata.
Requested instrument is unavailable from the provider.
Http
Unsuccessful HTTP response, retaining status and retry guidance.
Fields
Transport
Transport failure with provider or credential-bearing text omitted.
Timeout
HTTP request exceeded its transport timeout.
Configuration
HTTP transport or proxy configuration failed.
Parse
Response JSON could not be decoded; retains location without response content.
Fields
Response(&'static str)
Response violates the expected shape or traversal bounds.
AttemptBudget
Local managed attempt allowance is exhausted.
Retry(RetryError)
Retry operation failed or exceeded its deadline.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more