pub enum ApiError {
Request {
error: RequestError,
},
AuthenticationError {},
UnknownError {},
UrlError {},
ParseError {
text: String,
},
ConnectionError {},
LoggedOut {},
UsageError {},
}Expand description
The main Error enum for this library
Variants§
Request
Raised if the API returns a non-success status code
Fields
§
error: RequestErrorRequestError instance
AuthenticationError
Raised if authentication fails
UnknownError
Raised on an unexpected error. Should never appear in normal operation
UrlError
Raised if URL creation fails
ParseError
Raised if data parsing fails
ConnectionError
Raised if connecting to the API server fails
LoggedOut
Raised if an action cannot be performed when logged out
UsageError
Raised if invalid data was passed from the user, or if no Client instance is defined on the referenced struct
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiError
impl<'de> Deserialize<'de> for ApiError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnwindSafe for ApiError
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