#[non_exhaustive]pub enum QueryError<E>{
Client {
source: E,
},
SerializeBody {
source: Error,
},
DeserializeResponse {
source: Error,
},
Body {
source: Error,
},
Validation {
error_type: Option<String>,
message: Option<String>,
errors: Option<HashMap<String, Vec<String>>>,
body: Bytes,
},
Authentication {
message: Option<String>,
body: Bytes,
},
RateLimit {
message: Option<String>,
body: Bytes,
},
Api {
status: StatusCode,
error_type: Option<String>,
message: Option<String>,
body: Bytes,
},
}Expand description
An error thrown by the Query trait.
This enum is #[non_exhaustive] — new variants may be added in future
releases without a semver-breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Client
Fields
§
source: ESerializeBody
DeserializeResponse
Body
Validation
Validation error (HTTP 422) with per-field details.
Fields
Authentication
Authentication or authorization error (HTTP 401/403).
RateLimit
Rate limit exceeded (HTTP 429).
Api
Any other non-success API response.
Implementations§
Trait Implementations§
Source§impl<E> Debug for QueryError<E>
impl<E> Debug for QueryError<E>
Source§impl<E> Display for QueryError<E>
impl<E> Display for QueryError<E>
Source§impl<E> Error for QueryError<E>
impl<E> Error for QueryError<E>
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<E> !Freeze for QueryError<E>
impl<E> !RefUnwindSafe for QueryError<E>
impl<E> Send for QueryError<E>
impl<E> Sync for QueryError<E>
impl<E> Unpin for QueryError<E>where
E: Unpin,
impl<E> UnsafeUnpin for QueryError<E>where
E: UnsafeUnpin,
impl<E> !UnwindSafe for QueryError<E>
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