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)>
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