pub struct CheckpointedResult { /* private fields */ }Expand description
Result of checking for a checkpointed operation.
This struct provides methods to query the status of a previously checkpointed operation during replay.
Implementations§
Source§impl CheckpointedResult
impl CheckpointedResult
Sourcepub fn new(operation: Option<Operation>) -> Self
pub fn new(operation: Option<Operation>) -> Self
Creates a new CheckpointedResult with the given operation.
Sourcepub fn is_existent(&self) -> bool
pub fn is_existent(&self) -> bool
Returns true if a checkpoint exists for this operation.
Sourcepub fn is_succeeded(&self) -> bool
pub fn is_succeeded(&self) -> bool
Returns true if the operation succeeded.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if the operation was cancelled.
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
Returns true if the operation timed out.
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Returns true if the operation was stopped.
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Returns true if the operation is pending (waiting for retry). Requirements: 3.7, 4.7
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Returns true if the operation is ready to resume execution. Requirements: 3.7
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if the operation is in a terminal state (completed).
Sourcepub fn status(&self) -> Option<OperationStatus>
pub fn status(&self) -> Option<OperationStatus>
Returns the operation status if the checkpoint exists.
Sourcepub fn operation_type(&self) -> Option<OperationType>
pub fn operation_type(&self) -> Option<OperationType>
Returns the operation type if the checkpoint exists.
Sourcepub fn result(&self) -> Option<&str>
pub fn result(&self) -> Option<&str>
Returns the serialized result if the operation succeeded. This checks both type-specific details (e.g., StepDetails.Result) and the legacy Result field.
Sourcepub fn error(&self) -> Option<&ErrorObject>
pub fn error(&self) -> Option<&ErrorObject>
Returns the error if the operation failed.
Sourcepub fn into_operation(self) -> Option<Operation>
pub fn into_operation(self) -> Option<Operation>
Consumes self and returns the underlying operation.
Sourcepub fn retry_payload(&self) -> Option<&str>
pub fn retry_payload(&self) -> Option<&str>
Returns the retry payload if this is a STEP operation with a payload.
This is used for the wait-for-condition pattern where state is passed between retry attempts via the Payload field.
§Returns
The payload string if available, None otherwise.
Sourcepub fn attempt(&self) -> Option<u32>
pub fn attempt(&self) -> Option<u32>
Returns the current attempt number for STEP operations.
§Returns
The attempt number (0-indexed) if available, None otherwise.
Sourcepub fn callback_id(&self) -> Option<String>
pub fn callback_id(&self) -> Option<String>
Returns the callback ID for CALLBACK operations.
The callback ID is generated by the Lambda service when a CALLBACK operation is checkpointed and is stored in CallbackDetails.CallbackId.
§Returns
The callback ID if this is a CALLBACK operation with a callback ID, None otherwise.
Trait Implementations§
Source§impl Clone for CheckpointedResult
impl Clone for CheckpointedResult
Source§fn clone(&self) -> CheckpointedResult
fn clone(&self) -> CheckpointedResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CheckpointedResult
impl RefUnwindSafe for CheckpointedResult
impl Send for CheckpointedResult
impl Sync for CheckpointedResult
impl Unpin for CheckpointedResult
impl UnsafeUnpin for CheckpointedResult
impl UnwindSafe for CheckpointedResult
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