pub enum ItchioError {
RequestFailed(Error),
JsonParseError(Error),
InternalError(String),
BadKey,
BadEndpoint,
NotFound,
RateLimited,
}Expand description
When something goes wrong, an ItchioError is used to describe what happened.
Variants§
RequestFailed(Error)
A generic error used when none of the other possible errors are fitting.
JsonParseError(Error)
Happens if the API gives us an unexpected object, likely means there’s a mistake with this crate (or a bad struct given to request()).
InternalError(String)
Due to certain circumstances, no other error can be used.
BadKey
The key that was used was rejected by the server.
BadEndpoint
The crate received a 404 status, meaning the endpoint doesn’t exist or that there is a mistake with the URL.
NotFound
The crate received a 200 status with a specific error indicating the request is valid but the resource doesn’t exist.
RateLimited
The crate received a 429 status, meaning we sent too many requests in a given amount of time.
Trait Implementations§
Source§impl Debug for ItchioError
impl Debug for ItchioError
Source§impl Display for ItchioError
impl Display for ItchioError
Source§impl Error for ItchioError
impl Error for ItchioError
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
Source§impl From<Error> for ItchioError
impl From<Error> for ItchioError
Auto Trait Implementations§
impl Freeze for ItchioError
impl !RefUnwindSafe for ItchioError
impl Send for ItchioError
impl Sync for ItchioError
impl Unpin for ItchioError
impl !UnwindSafe for ItchioError
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.