pub struct ActivityContext {
pub task_id: String,
pub activity_attempt_id: String,
pub lease_owner: String,
pub activity_type: String,
pub attempt_number: u64,
pub task_queue: String,
pub worker_id: String,
/* private fields */
}Fields§
§task_id: String§activity_attempt_id: String§lease_owner: String§activity_type: String§attempt_number: u64§task_queue: String§worker_id: StringImplementations§
Source§impl ActivityContext
impl ActivityContext
Sourcepub fn worker_session(&self) -> Option<&WorkerSession>
pub fn worker_session(&self) -> Option<&WorkerSession>
Session affinity and holder-local lifecycle for this remote activity.
Source§impl ActivityContext
impl ActivityContext
Sourcepub fn activity_execution_id(&self) -> Option<&str>
pub fn activity_execution_id(&self) -> Option<&str>
Logical Server activity execution ID, stable across that activity’s retries.
This is the received claim identity, including for worker-session activities. It is unavailable when an older Server omits it, for inline local activities before the Server records their command, and in Server-free tests. It is never derived from a per-attempt task or attempt ID. Use an application business key when this value is unavailable.
Sourcepub fn workflow_id(&self) -> Option<&str>
pub fn workflow_id(&self) -> Option<&str>
Owning workflow instance ID from the claim (or parent local workflow task).
Older claims and Server-free activity tests can report None.
Sourcepub fn run_id(&self) -> Option<&str>
pub fn run_id(&self) -> Option<&str>
Owning workflow run ID from the claim (or parent local workflow task).
Older claims and Server-free activity tests can report None.
Sourcepub fn retry_info(&self) -> &ActivityRetryInfo
pub fn retry_info(&self) -> &ActivityRetryInfo
Immutable original attempt identity and received retry policy.
pub async fn heartbeat<T: Serialize>( &self, details: T, ) -> Result<ActivityHeartbeatResponse>
Trait Implementations§
Source§impl Clone for ActivityContext
impl Clone for ActivityContext
Source§fn clone(&self) -> ActivityContext
fn clone(&self) -> ActivityContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more