pub enum ApiErrorKind {
Recoverable(String),
Unrecoverable(String),
}
Expand description
Failure context for the ApiError
type. The kind is used to indicate whether the
error is recoverable and should be retried or not.
Variants§
Recoverable(String)
Runtime implementations that receive recoverable errors should automatically retry requests
Unrecoverable(String)
Unrecoverable error should cause the runtime implementation to call the fail_init
method of the Runtime APIs if it is appropriate and then shutdown gracefully
Trait Implementations§
Source§impl Clone for ApiErrorKind
impl Clone for ApiErrorKind
Source§fn clone(&self) -> ApiErrorKind
fn clone(&self) -> ApiErrorKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ApiErrorKind
impl Debug for ApiErrorKind
Source§impl Display for ApiErrorKind
impl Display for ApiErrorKind
Source§impl Fail for ApiErrorKind
impl Fail for ApiErrorKind
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreSource§impl From<ApiErrorKind> for ApiError
impl From<ApiErrorKind> for ApiError
Source§fn from(kind: ApiErrorKind) -> Self
fn from(kind: ApiErrorKind) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ApiErrorKind
impl PartialEq for ApiErrorKind
impl StructuralPartialEq for ApiErrorKind
Auto Trait Implementations§
impl Freeze for ApiErrorKind
impl RefUnwindSafe for ApiErrorKind
impl Send for ApiErrorKind
impl Sync for ApiErrorKind
impl Unpin for ApiErrorKind
impl UnwindSafe for ApiErrorKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more