pub enum Error {
JsonError(Error),
UrlEncodedError(Error),
UrlParseError(ParseError),
ReqwestError(Box<Error>, String),
ScryfallError(ScryfallError),
HttpError(StatusCode),
IoError(Error),
Other(String),
}
Expand description
The errors that may occur when interacting with the scryfall API.
Variants§
JsonError(Error)
Couldn’t parse the json returned from scryfall. This error should never occur. If it does, please open an issue.
UrlEncodedError(Error)
Couldn’t write URL query params.
UrlParseError(ParseError)
A URL could not be parsed.
ReqwestError(Box<Error>, String)
Something went wrong when making the HTTP request.
ScryfallError(ScryfallError)
Scryfall error. Please refer to the official docs.
HttpError(StatusCode)
HTTP error with status code.
IoError(Error)
IO error.
Other(String)
Other.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for Box<Error>
impl From<Error> for Box<Error>
source§fn from(err: SerdeError) -> Self
fn from(err: SerdeError) -> Self
Converts to this type from the input type.
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(err: ReqwestError) -> Self
fn from(err: ReqwestError) -> Self
Converts to this type from the input type.
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(source: SerdeError) -> Self
fn from(source: SerdeError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for Box<Error>
impl From<ParseError> for Box<Error>
source§fn from(err: UrlParseError) -> Self
fn from(err: UrlParseError) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(source: UrlParseError) -> Self
fn from(source: UrlParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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