pub enum RouxError {
Status(Response),
Network(Error),
Parse(Error),
Auth(String),
CredentialsNotSet,
OAuthClientRequired,
}
Expand description
Error type that occurs when an API request fails for some reason.
Variants§
Status(Response)
Occurs when the API has returned a non-success error code.
Network(Error)
Occurs if the HTTP response from Reddit was corrupt and reqwest could not parse it.
Parse(Error)
Occurs if serde could not Deserialize the response.
Auth(String)
Occurs if there is a grant error.
CredentialsNotSet
Occurs if [Reddit::create_client
] is called before [Reddit::username
] and [Reddit::password
].
OAuthClientRequired
Occurs if endpoint requires OAuth
Trait Implementations§
source§impl Error for RouxError
impl Error for RouxError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for RouxError
impl Send for RouxError
impl Sync for RouxError
impl Unpin for RouxError
impl !UnwindSafe for RouxError
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