#[non_exhaustive]pub enum Error {
Show 51 variants
Transport(Error),
InvalidBaseUrl,
InvalidRootCertificates(String),
Testing(TestingError),
Json(Error),
Http {
status: StatusCode,
body: String,
},
Codec(String),
QueryFailed(QueryFailure),
Protocol(ProtocolFailure),
NonDeterministicReplay(ReplayFailure),
ChildWorkflowFailed(ChildWorkflowFailure),
ActivityFailed(ActivityFailure),
ActivityError(ActivityError),
NexusOperationFailed(Box<NexusOperationFailure>),
ParallelFailed(ParallelFailure),
SagaCompensationFailed(SagaCompensationFailure),
InvalidParallelGroup(ParallelGroupError),
DurableOperationCancelled(DurableOperationCancelled),
WorkflowCancellationRequested(WorkflowCancellationRequested),
CooperativeCancellationRequested(CooperativeCancellationRequested),
CancellationScopeRequested(CancellationScopeRequested),
WorkflowCommandRejected(WorkflowCommandRejection),
WorkflowFailed(WorkflowTerminalOutcome),
WorkflowCancelled(WorkflowTerminalOutcome),
WorkflowTerminated(WorkflowTerminalOutcome),
WorkflowTimedOut(WorkflowTerminalOutcome),
ActivityTaskRejected(ActivityTaskRejection),
ActivityLeaseRenewalUnavailable(String),
WorkflowNotRegistered(String),
ActivityNotRegistered(String),
HandlerType {
handler_kind: HandlerKind,
handler_name: String,
value_kind: HandlerValueKind,
rust_type: &'static str,
message: String,
},
WorkflowYieldedWithoutCommand,
MissingWorkflowCommandIdentity,
WorkflowStatePoisoned,
TimerDurationOverflow,
InvalidConditionWaitOptions(ConditionWaitOptionsError),
InvalidSearchAttributeUpdate(SearchAttributeUpdateError),
Timeout,
MissingRoleCredentials {
role: &'static str,
opposite_role: &'static str,
},
WorkerLoop(String),
UnsupportedUpdateValidators {
workflow_type: String,
},
WorkerShutdown {
primary: Box<Error>,
deregistration: Box<Error>,
},
InvalidChildWorkflowOptions(String),
InvalidMemoUpdate(String),
WorkflowMemoUpdatesUnavailable,
CooperativeCancellationUnavailable(String),
CancellationScopeExecutionUnavailable,
InvalidCooperativeCancellation(String),
ActivityExecutionAbandoned(String),
InvalidActivityOptions(ActivityOptionsError),
InvalidContinueAsNewOptions(ContinueAsNewOptionsError),
}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.
Transport(Error)
InvalidBaseUrl
InvalidRootCertificates(String)
Testing(TestingError)
Json(Error)
Http
Codec(String)
QueryFailed(QueryFailure)
Protocol(ProtocolFailure)
NonDeterministicReplay(ReplayFailure)
ChildWorkflowFailed(ChildWorkflowFailure)
ActivityFailed(ActivityFailure)
ActivityError(ActivityError)
NexusOperationFailed(Box<NexusOperationFailure>)
ParallelFailed(ParallelFailure)
SagaCompensationFailed(SagaCompensationFailure)
InvalidParallelGroup(ParallelGroupError)
DurableOperationCancelled(DurableOperationCancelled)
WorkflowCancellationRequested(WorkflowCancellationRequested)
CooperativeCancellationRequested(CooperativeCancellationRequested)
CancellationScopeRequested(CancellationScopeRequested)
WorkflowCommandRejected(WorkflowCommandRejection)
WorkflowFailed(WorkflowTerminalOutcome)
WorkflowCancelled(WorkflowTerminalOutcome)
WorkflowTerminated(WorkflowTerminalOutcome)
WorkflowTimedOut(WorkflowTerminalOutcome)
ActivityTaskRejected(ActivityTaskRejection)
WorkflowNotRegistered(String)
ActivityNotRegistered(String)
HandlerType
WorkflowYieldedWithoutCommand
MissingWorkflowCommandIdentity
WorkflowStatePoisoned
TimerDurationOverflow
InvalidConditionWaitOptions(ConditionWaitOptionsError)
InvalidSearchAttributeUpdate(SearchAttributeUpdateError)
Timeout
MissingRoleCredentials
WorkerLoop(String)
UnsupportedUpdateValidators
WorkerShutdown
InvalidChildWorkflowOptions(String)
InvalidMemoUpdate(String)
InvalidCooperativeCancellation(String)
ActivityExecutionAbandoned(String)
InvalidActivityOptions(ActivityOptionsError)
InvalidContinueAsNewOptions(ContinueAsNewOptionsError)
Implementations§
Source§impl Error
impl Error
Sourcepub fn request_id(&self) -> Option<String>
pub fn request_id(&self) -> Option<String>
The caller command key echoed by the Server in a refusal body.
Signals and updates send their key as the request_id body field, and a
Server refusal such as request_id_conflict echoes it. Transport failures
and refusals without an echoed key return None: keep the key you passed
to a *_with_request_id method, or obtained from
Client::generate_signal_request_id or
Client::generate_update_request_id, to retry the same logical command
after an uncertain outcome.
Sourcepub fn is_request_id_conflict(&self) -> bool
pub fn is_request_id_conflict(&self) -> bool
Whether the Server refused a signal or update because its caller command
key is retained for a command with a different intent
(HTTP 409, reason: "request_id_conflict").
Sourcepub fn request_id_conflict(&self) -> Option<RequestIdConflict>
pub fn request_id_conflict(&self) -> Option<RequestIdConflict>
The retained-command details of a request_id_conflict refusal.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<ActivityError> for Error
impl From<ActivityError> for Error
Source§fn from(source: ActivityError) -> Self
fn from(source: ActivityError) -> Self
Converts to this type from the input type.
Source§impl From<ConditionWaitOptionsError> for Error
impl From<ConditionWaitOptionsError> for Error
Source§fn from(source: ConditionWaitOptionsError) -> Self
fn from(source: ConditionWaitOptionsError) -> Self
Converts to this type from the input type.
Source§impl From<ContinueAsNewOptionsError> for Error
impl From<ContinueAsNewOptionsError> for Error
Source§fn from(source: ContinueAsNewOptionsError) -> Self
fn from(source: ContinueAsNewOptionsError) -> Self
Converts to this type from the input type.
Source§impl From<DuplicateRegistrationError> for Error
impl From<DuplicateRegistrationError> for Error
Source§fn from(error: DuplicateRegistrationError) -> Self
fn from(error: DuplicateRegistrationError) -> Self
Converts to this type from the input type.
Source§impl From<SearchAttributeUpdateError> for Error
impl From<SearchAttributeUpdateError> for Error
Source§fn from(source: SearchAttributeUpdateError) -> Self
fn from(source: SearchAttributeUpdateError) -> Self
Converts to this type from the input type.
Source§impl From<TestingError> for Error
impl From<TestingError> for Error
Source§fn from(source: TestingError) -> Self
fn from(source: TestingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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