Skip to main content

invoking_context

Function invoking_context 

pub fn invoking_context() -> Option<ActionContext>
Expand description

The context of the action whose Action::apply is running on this thread: who invoked it and in which work group (an agent run). Pinned by the envelope like the actor and the time, so a replica replaying the action reads the same value. None outside an apply, or for an action dispatched with no context.

An action whose meaning depends on its author — “undo my last step” — reads it here; any other action must not.