pub enum DataError {
Transport(String),
Status {
status: u16,
message: String,
},
Decode(String),
RateLimited {
retry_after: Option<u64>,
},
MissingKey(&'static str),
Unsupported {
provider: &'static str,
what: &'static str,
},
Other(String),
}Expand description
Errors surfaced by providers and the HTTP transport.
Variants§
Transport(String)
A network/transport-level failure (DNS, TLS, connection, timeout).
Status
The upstream returned a status we treat as an error.
Fields
Decode(String)
The response body could not be parsed into the expected shape.
RateLimited
The provider was rate limited; retry_after is the server hint, if any.
MissingKey(&'static str)
A required API key for the selected provider was not configured.
Unsupported
The selected provider does not support this operation (e.g. fine-grained live events on a limited free tier).
Other(String)
Any other error with a human-readable message.
Trait Implementations§
Source§impl Error for DataError
impl Error for DataError
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 DataError
impl RefUnwindSafe for DataError
impl Send for DataError
impl Sync for DataError
impl Unpin for DataError
impl UnsafeUnpin for DataError
impl UnwindSafe for DataError
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