pub struct Error { /* private fields */ }Expand description
The error type for reqsign operations
Implementations§
Source§impl Error
impl Error
Sourcepub fn new(kind: ErrorKind, message: impl Into<String>) -> Self
pub fn new(kind: ErrorKind, message: impl Into<String>) -> Self
Create a new error with the given kind and message
Sourcepub fn with_source(self, source: impl Into<Error>) -> Self
pub fn with_source(self, source: impl Into<Error>) -> Self
Add a source error
Sourcepub fn with_context(self, context: impl Display) -> Self
pub fn with_context(self, context: impl Display) -> Self
Add context information for debugging
Sourcepub fn set_retryable(self, retryable: bool) -> Self
pub fn set_retryable(self, retryable: bool) -> Self
Override the retryable status
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable
Source§impl Error
impl Error
Sourcepub fn credential_invalid(message: impl Into<String>) -> Self
pub fn credential_invalid(message: impl Into<String>) -> Self
Create a credential invalid error
Sourcepub fn permission_denied(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
Create a permission denied error
Sourcepub fn config_invalid(message: impl Into<String>) -> Self
pub fn config_invalid(message: impl Into<String>) -> Self
Create a config invalid error
Sourcepub fn request_invalid(message: impl Into<String>) -> Self
pub fn request_invalid(message: impl Into<String>) -> Self
Create a request invalid error
Sourcepub fn rate_limited(message: impl Into<String>) -> Self
pub fn rate_limited(message: impl Into<String>) -> Self
Create a rate limited error
Sourcepub fn unexpected(message: impl Into<String>) -> Self
pub fn unexpected(message: impl Into<String>) -> Self
Create an unexpected error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderName> for Error
impl From<InvalidHeaderName> for Error
Source§fn from(err: InvalidHeaderName) -> Self
fn from(err: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(err: InvalidHeaderValue) -> Self
fn from(err: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
Source§fn from(err: InvalidUri) -> Self
fn from(err: InvalidUri) -> Self
Converts to this type from the input type.
Source§impl From<InvalidUriParts> for Error
impl From<InvalidUriParts> for Error
Source§fn from(err: InvalidUriParts) -> Self
fn from(err: InvalidUriParts) -> Self
Converts to this type from the input type.
Source§impl From<ToStrError> for Error
impl From<ToStrError> for Error
Source§fn from(err: ToStrError) -> Self
fn from(err: ToStrError) -> Self
Converts to this type from the input type.
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