#[non_exhaustive]pub enum Error {
InvalidConfig(Box<InvalidConfigError>),
Transport(Box<TransportError>),
Decode(Box<DecodeError>),
Auth(Box<ApiError>),
NotFound(Box<ApiError>),
Conflict(Box<ApiError>),
RateLimited(Box<RateLimitedError>),
Api(Box<ApiError>),
}Variants (Non-exhaustive)ยง
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidConfig(Box<InvalidConfigError>)
Transport(Box<TransportError>)
Decode(Box<DecodeError>)
Auth(Box<ApiError>)
NotFound(Box<ApiError>)
Conflict(Box<ApiError>)
RateLimited(Box<RateLimitedError>)
Api(Box<ApiError>)
Implementationsยง
Sourceยงimpl Error
impl Error
pub fn kind(&self) -> ErrorKind
pub fn status(&self) -> Option<StatusCode>
pub fn method(&self) -> Option<&Method>
pub fn host(&self) -> Option<&str>
pub fn path(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
pub fn code(&self) -> Option<&str>
pub fn body_snippet(&self) -> Option<&str>
pub fn retry_after(&self) -> Option<Duration>
pub fn is_retryable(&self) -> bool
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
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Sourceยงimpl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Sourceยงfn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.