pub struct Error { /* private fields */ }
Expand description
The Errors that may occur when using Modio
.
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_auth(&self) -> bool
pub fn is_auth(&self) -> bool
Returns true if the API key/access token is incorrect, revoked, expired or the request needs a different authentication method.
Sourcepub fn is_terms_acceptance_required(&self) -> bool
pub fn is_terms_acceptance_required(&self) -> bool
Returns true if the acceptance of the Terms of Use is required before continuing external authorization.
Sourcepub fn is_builder(&self) -> bool
pub fn is_builder(&self) -> bool
Returns true if the error is from a type Builder.
Sourcepub fn is_download(&self) -> bool
pub fn is_download(&self) -> bool
Returns true if the error is from a DownloadAction
.
Sourcepub fn is_ratelimited(&self) -> bool
pub fn is_ratelimited(&self) -> bool
Returns true if the rate limit associated with credentials has been exhausted.
Sourcepub fn is_response(&self) -> bool
pub fn is_response(&self) -> bool
Returns true if the error was generated from a response.
Sourcepub fn is_validation(&self) -> bool
pub fn is_validation(&self) -> bool
Returns true if the error contains validation errors.
Sourcepub fn api_error(&self) -> Option<&ApiError>
pub fn api_error(&self) -> Option<&ApiError>
Returns the API error if the error was generated from a response.
Sourcepub fn error_ref(&self) -> Option<u16>
pub fn error_ref(&self) -> Option<u16>
Returns modio’s error reference code.
See the Error Codes docs for more information.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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()
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