pub struct InvocationContext {
pub invocation_id: InvocationId,
pub task_id: TaskId,
pub workflow: WorkflowIdentity,
pub parent_invocation_id: Option<InvocationId>,
pub num_retries: u32,
}Expand description
Context for the currently executing invocation.
Stored in a tokio::task_local! variable so any code running inside the
task’s future can retrieve it without passing references through the
call stack.
Fields§
§invocation_id: InvocationIdThe invocation being executed.
task_id: TaskIdThe task that is being executed.
workflow: WorkflowIdentityThe workflow this invocation belongs to.
parent_invocation_id: Option<InvocationId>The parent invocation that spawned this one (None for top-level).
num_retries: u32The current retry attempt number (0 for first attempt).
Trait Implementations§
Source§impl Clone for InvocationContext
impl Clone for InvocationContext
Source§fn clone(&self) -> InvocationContext
fn clone(&self) -> InvocationContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InvocationContext
impl RefUnwindSafe for InvocationContext
impl Send for InvocationContext
impl Sync for InvocationContext
impl Unpin for InvocationContext
impl UnsafeUnpin for InvocationContext
impl UnwindSafe for InvocationContext
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