#[non_exhaustive]pub enum CombinatorErrorKind {
JoinFailed(JoinFailed),
#[non_exhaustive] AllFailed,
#[non_exhaustive] FirstSettledFailed,
#[non_exhaustive] EmptyInput,
#[non_exhaustive] Internal,
}Expand description
Specific kinds of combinator failures.
§Examples
use aws_durable_execution_sdk::CombinatorErrorKind;
fn first_failed_index(kind: &CombinatorErrorKind) -> Option<usize> {
match kind {
CombinatorErrorKind::JoinFailed(details) => Some(details.failed_index()),
_ => None,
}
}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.
JoinFailed(JoinFailed)
One or more futures in try_join_all failed.
#[non_exhaustive]AllFailed
All futures in select_ok failed.
Every loser’s error is reachable through
CombinatorError::failures.
#[non_exhaustive]FirstSettledFailed
The first settled future in race was a failure.
race propagates the first outcome to settle, success or failure.
When that outcome is a failure, the losing future’s error is
carried as the error’s source.
#[non_exhaustive]EmptyInput
The combinator was called with no futures.
Returned by race and select_ok, which cannot produce a winner
from an empty input. try_join_all and join_all instead resolve
successfully to an empty collection.
#[non_exhaustive]Internal
An internal error occurred.
Trait Implementations§
Source§impl Debug for CombinatorErrorKind
impl Debug for CombinatorErrorKind
Auto Trait Implementations§
impl Forget for CombinatorErrorKind
impl Freeze for CombinatorErrorKind
impl Move for CombinatorErrorKind
impl RefUnwindSafe for CombinatorErrorKind
impl Send for CombinatorErrorKind
impl Sync for CombinatorErrorKind
impl Unpin for CombinatorErrorKind
impl UnsafeUnpin for CombinatorErrorKind
impl UnwindSafe for CombinatorErrorKind
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> 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 moreCreates a shared type from an unshared type.