pub trait ActionCompute: __Sealed + ArkheAction {
// Required method
fn compute<'i>(
&self,
ctx: &mut ActionContext<'i>,
) -> Result<(), ActionError>;
}Expand description
Compute-phase trait. Each ArkheAction implementor provides the body
of this method manually — business logic per Action is unique, so
compute is intentionally not derive-generated.
Implementations must be deterministic and side-effect-free outside of
ctx (L0 A11 pure-compute succession).
Required Methods§
Sourcefn compute<'i>(&self, ctx: &mut ActionContext<'i>) -> Result<(), ActionError>
fn compute<'i>(&self, ctx: &mut ActionContext<'i>) -> Result<(), ActionError>
Run the compute body. Emit events via ctx.emit_event, derive new
ids via ctx.next_id, and return Err(ActionError::...) to reject.
A user-scoped Action reads its acting identity from
ActionContext::acting_actor
(the authenticated actor the runtime injected at the dispatch
boundary) and rejects when it is None — the acting actor is a
single source of truth, never a wire payload field, so
actor-substitution is structurally impossible.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".