pub struct ActivityFailure {Show 16 fields
pub kind: ActivityFailureKind,
pub reason: String,
pub message: String,
pub activity_execution_id: Option<String>,
pub activity_attempt_id: Option<String>,
pub activity_type: Option<String>,
pub activity_class: Option<String>,
pub attempt_number: Option<u64>,
pub failure_id: Option<String>,
pub failure_category: Option<String>,
pub timeout_kind: Option<String>,
pub non_retryable: bool,
pub exception_type: Option<String>,
pub exception_class: Option<String>,
pub code: Option<Value>,
pub exception: Option<Value>,
}Expand description
A stable, machine-readable terminal activity failure.
Match Error::ActivityFailed and inspect kind, reason,
failure_category, or timeout_kind; display text is only diagnostic.
Fields§
§kind: ActivityFailureKind§reason: String§message: String§activity_execution_id: Option<String>§activity_attempt_id: Option<String>§activity_type: Option<String>§activity_class: Option<String>§attempt_number: Option<u64>§failure_id: Option<String>§failure_category: Option<String>§timeout_kind: Option<String>§non_retryable: bool§exception_type: Option<String>§exception_class: Option<String>§code: Option<Value>§exception: Option<Value>Implementations§
Source§impl ActivityFailure
impl ActivityFailure
Sourcepub fn lease_loss_reason(&self) -> Option<LeaseLossReason>
pub fn lease_loss_reason(&self) -> Option<LeaseLossReason>
Why the attempt lost its worker, or None when it failed for another
reason.
WorkerLost means a worker released the attempt (exception_type
worker_lost) because it could not keep the lease. A lease the Server
settled (ActivityLeaseExpiredException) reports the Server’s recorded
failure_reason: WorkerDeregistered, or LeaseExpired by default.
The Server records that reason beside the exception in the history
payload; replay copies it into exception.failure_reason, so this
works without a new field. Whether to retry is the retry policy’s
choice; the default policy is unchanged.
Trait Implementations§
Source§impl Clone for ActivityFailure
impl Clone for ActivityFailure
Source§impl Debug for ActivityFailure
impl Debug for ActivityFailure
Source§impl Display for ActivityFailure
impl Display for ActivityFailure
Source§impl Error for ActivityFailure
impl Error for ActivityFailure
1.30.0 · 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()