#[non_exhaustive]pub enum WaiterError<O, E> {
ConstructionFailure(ConstructionFailure),
ExceededMaxWait(ExceededMaxWait),
FailureState(FailureState<O, E>),
OperationFailed(OperationFailed<E>),
}
Expand description
An error occurred while waiting.
This error type is useful for distinguishing between the max wait time being exceeded, or some other failure occurring.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConstructionFailure(ConstructionFailure)
An error occurred during waiter initialization.
This can happen if the input/config is invalid.
ExceededMaxWait(ExceededMaxWait)
The maximum wait time was exceeded without completion.
FailureState(FailureState<O, E>)
Waiting ended in a failure state.
A failed waiter state can occur on a successful response from the server if, for example, that response indicates that the thing being waited for won’t succeed/finish.
A failure state error will only occur for successful or modeled error responses. Unmodeled error responses will never make it into this error case.
OperationFailed(OperationFailed<E>)
A polling operation failed while waiting.
This error will only occur for unmodeled errors. Modeled errors can potentially
be handled by the waiter logic, and will therefore end up in WaiterError::FailureState
.
Note: If retry is configured, this means that the operation failed after retrying the configured number of attempts.
Implementations§
Source§impl<O, E> WaiterError<O, E>
impl<O, E> WaiterError<O, E>
Sourcepub fn construction_failure(source: impl Into<BoxError>) -> Self
pub fn construction_failure(source: impl Into<BoxError>) -> Self
Construct a waiter construction failure with the given error source.
Trait Implementations§
Source§impl<O, E> Display for WaiterError<O, E>
impl<O, E> Display for WaiterError<O, E>
Source§impl<O, E> Error for WaiterError<O, E>
impl<O, E> Error for WaiterError<O, E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<O, E> ProvideErrorMetadata for WaiterError<O, E>where
E: ProvideErrorMetadata,
impl<O, E> ProvideErrorMetadata for WaiterError<O, E>where
E: ProvideErrorMetadata,
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Auto Trait Implementations§
impl<O, E> !Freeze for WaiterError<O, E>
impl<O, E> !RefUnwindSafe for WaiterError<O, E>
impl<O, E> Send for WaiterError<O, E>
impl<O, E> Sync for WaiterError<O, E>
impl<O, E> Unpin for WaiterError<O, E>
impl<O, E> !UnwindSafe for WaiterError<O, E>
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
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> 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>
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>
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