pub enum ErrorKind {
Show 13 variants
NoData,
BlokliError {
kind: &'static str,
code: String,
message: String,
},
InvalidInput(&'static str),
TrackingError(TrackingErrorKind),
ParseError,
Timeout,
Subscription(Box<Error>),
UrlParse(ParseError),
Serialization(Error),
Reqwest(Error),
Cynic(CynicReqwestError),
GraphQLError(GraphQlError),
MockClientError(Error),
}Expand description
Error kinds for the Blokli client.
Variants§
NoData
Blokli returned neither data nor usable GraphQL errors.
BlokliError
Blokli returned an application-level error through a GraphQL union result.
Fields
InvalidInput(&'static str)
Local input was rejected before the request was sent.
TrackingError(TrackingErrorKind)
Transaction tracking reached a terminal failure state.
ParseError
Blokli returned data in a shape or encoding the client could not parse.
Timeout
A client-side timeout elapsed.
Subscription(Box<Error>)
SSE subscription setup or transport failed.
UrlParse(ParseError)
A URL could not be parsed or derived.
Serialization(Error)
JSON serialization or deserialization failed.
Reqwest(Error)
HTTP transport failed.
Cynic(CynicReqwestError)
Cynic request/response handling failed.
GraphQLError(GraphQlError)
GraphQL returned errors without usable data.
MockClientError(Error)
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
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()
Source§impl From<CynicReqwestError> for ErrorKind
impl From<CynicReqwestError> for ErrorKind
Source§fn from(source: CynicReqwestError) -> Self
fn from(source: CynicReqwestError) -> Self
Converts to this type from the input type.
Source§impl From<GraphQlError> for ErrorKind
impl From<GraphQlError> for ErrorKind
Source§fn from(source: GraphQlError) -> Self
fn from(source: GraphQlError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for ErrorKind
impl From<ParseError> for ErrorKind
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorKind
impl !UnwindSafe for ErrorKind
impl Freeze for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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