#[non_exhaustive]pub struct CombinatorError { /* private fields */ }Expand description
Error from a combinator operation (try_join_all, join_all,
select_ok, race).
The combinator preserves the losing futures’ errors as errors:
source() returns the first loser, and
failures() returns every loser (in input order for
CombinatorErrorKind::AllFailed).
§Examples
use aws_durable_execution_sdk::{CombinatorError, CombinatorErrorKind};
fn report(err: &CombinatorError) {
if let CombinatorErrorKind::AllFailed { .. } = err.kind() {
for loser in err.failures() {
tracing::error!(error = format!("{loser}"), "branch failed");
}
}
}Implementations§
Source§impl CombinatorError
impl CombinatorError
Sourcepub fn kind(&self) -> &CombinatorErrorKind
pub fn kind(&self) -> &CombinatorErrorKind
Returns the specific kind of combinator error.
Sourcepub fn failures(&self) -> &[Box<dyn Error + Send + Sync + 'static>]
pub fn failures(&self) -> &[Box<dyn Error + Send + Sync + 'static>]
The underlying failures, preserved as errors.
For CombinatorErrorKind::JoinFailed and
CombinatorErrorKind::FirstSettledFailed this holds the single
losing error; for CombinatorErrorKind::AllFailed it holds every
loser in input order. After a replay, each entry is a
ReplayedFailure rebuilt from the recorded wire fields.
Trait Implementations§
Source§impl Debug for CombinatorError
impl Debug for CombinatorError
Source§impl Display for CombinatorError
impl Display for CombinatorError
Source§impl Error for CombinatorError
impl Error for CombinatorError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for CombinatorError
impl !UnwindSafe for CombinatorError
impl Forget for CombinatorError
impl Freeze for CombinatorError
impl Move for CombinatorError
impl Send for CombinatorError
impl Sync for CombinatorError
impl Unpin for CombinatorError
impl UnsafeUnpin for CombinatorError
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.