#[non_exhaustive]pub struct ExecutionClientError { /* private fields */ }Expand description
The terminal outcome a transport returns: a scope, a message and, when the transport has one, the error that caused it.
source() returns the error passed to
with_source.
A transport puts the detail a log needs into the message. The built-in
LambdaExecutionClient keeps the full DisplayErrorContext text of
the AWS SDK error in the message, and passes the final SdkError as the
source.
The name of this type is not a wire ErrorType, and its Display text
is not a wire ErrorMessage. An Execution-scoped
error that ends the bootstrap state read records the AWS error code when
the Lambda transport supplied it, and DurableExecutionClientError
otherwise. A recorded message is the AWS error’s message when the Lambda
transport supplied one, and the message passed to new or
with_source otherwise.
Clone because a coalesced checkpoint batch publishes one result to
every operation that contributed updates to it. The source is held in an
Arc for that reason.
Implementations§
Source§impl ExecutionClientError
impl ExecutionClientError
Sourcepub fn new(scope: ExecutionClientErrorScope, message: impl Into<String>) -> Self
pub fn new(scope: ExecutionClientErrorScope, message: impl Into<String>) -> Self
Creates an error with the given scope and message, and no source.
§Examples
use aws_durable_execution_sdk::{ExecutionClientError, ExecutionClientErrorScope};
let err = ExecutionClientError::new(ExecutionClientErrorScope::Execution, "rejected");
assert_eq!(err.scope(), ExecutionClientErrorScope::Execution);
assert_eq!(err.to_string(), "durable: client: rejected");Sourcepub fn with_source(
scope: ExecutionClientErrorScope,
message: impl Into<String>,
source: impl Into<BoxError>,
) -> Self
pub fn with_source( scope: ExecutionClientErrorScope, message: impl Into<String>, source: impl Into<BoxError>, ) -> Self
Creates an error with the given scope and message, keeping source
as the error that caused it.
§Examples
use std::error::Error as _;
use aws_durable_execution_sdk::{ExecutionClientError, ExecutionClientErrorScope};
let cause = std::io::Error::other("connection reset");
let err = ExecutionClientError::with_source(
ExecutionClientErrorScope::Invocation,
"checkpoint failed",
cause,
);
assert!(err.source().is_some());Sourcepub fn scope(&self) -> ExecutionClientErrorScope
pub fn scope(&self) -> ExecutionClientErrorScope
The recovery scope of this error.
Trait Implementations§
Source§impl Clone for ExecutionClientError
impl Clone for ExecutionClientError
Source§impl Debug for ExecutionClientError
impl Debug for ExecutionClientError
Source§impl Display for ExecutionClientError
impl Display for ExecutionClientError
Source§impl Error for ExecutionClientError
impl Error for ExecutionClientError
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
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionClientError
impl !UnwindSafe for ExecutionClientError
impl Forget for ExecutionClientError
impl Freeze for ExecutionClientError
impl Move for ExecutionClientError
impl Send for ExecutionClientError
impl Sync for ExecutionClientError
impl Unpin for ExecutionClientError
impl UnsafeUnpin for ExecutionClientError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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