pub enum Error {
Show 14 variants
Io(Error),
Http(Error),
Hyper(Error),
Json(Error),
Status(StatusCode),
InvalidParameters,
UnknownAPIError(u64),
NotAuthorized,
Maintenance,
BackendError,
LoginError(LoginError),
ProfileError(ProfileError),
TradingError(TradingError),
RagfairError(RagfairError),
}Expand description
Common error enum returned by most functions.
Variants§
Io(Error)
A std::io error
Http(Error)
HTTP request error.
Hyper(Error)
A hyper crate error.
Json(Error)
A serde_json error.
Status(StatusCode)
Generic non-success response from the API.
InvalidParameters
Invalid or missing parameters.
UnknownAPIError(u64)
Unidentified error within the EFT API.
NotAuthorized
Not authorized to API or profile is not selected.
Maintenance
EFT API is down for maintenance.
BackendError
Backend error. No other information is given.
LoginError(LoginError)
Authentication API error.
ProfileError(ProfileError)
Profile API error.
TradingError(TradingError)
Trading API error.
RagfairError(RagfairError)
Ragfair API error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl From<LoginError> for Error
impl From<LoginError> for Error
Source§fn from(from: LoginError) -> Self
fn from(from: LoginError) -> Self
Converts to this type from the input type.
Source§impl From<ProfileError> for Error
impl From<ProfileError> for Error
Source§fn from(from: ProfileError) -> Self
fn from(from: ProfileError) -> Self
Converts to this type from the input type.
Source§impl From<RagfairError> for Error
impl From<RagfairError> for Error
Source§fn from(from: RagfairError) -> Self
fn from(from: RagfairError) -> Self
Converts to this type from the input type.
Source§impl From<TradingError> for Error
impl From<TradingError> for Error
Source§fn from(from: TradingError) -> Self
fn from(from: TradingError) -> 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