pub enum ClientError {
NotFound,
Stale(Box<Character>),
Exhausted(String),
Rejected(String),
Server {
status: StatusCode,
message: String,
},
Http(Error),
InvalidResponse(Error),
Unauthorized(String),
Forbidden(String),
Conflict(String),
WebSocket(String),
}Expand description
What can go wrong talking to a service.
Variants§
NotFound
Stale(Box<Character>)
The character changed on the server since this copy was fetched.
Exhausted(String)
The character is out of the slot/uses the action needed.
Rejected(String)
The server refused the request as invalid.
Server
Http(Error)
InvalidResponse(Error)
The server answered, but not with what this client expected; usually a client/server version mismatch.
No valid credentials: not logged in, or the token expired.
Forbidden(String)
Logged in, but not allowed to do this.
Conflict(String)
Something’s in the way: from the admin API, a campaign’s data where an import would put it.
WebSocket(String)
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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<ClientError> for PairError
impl From<ClientError> for PairError
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClientError
impl !RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl !UnwindSafe for ClientError
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