Skip to main content

ActionExecutor

Trait ActionExecutor 

Source
pub trait ActionExecutor: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn execute(
        &self,
        action: &Action,
        ctx: &ExecCtx<'_>,
    ) -> Result<ExecStep, ExecError>;
}
Expand description

Uniform surface for anything that consumes an Action.

Implementations MUST treat ExecCtx as read-only and MUST return a ExecStep on success even for no-op paths (e.g. a predicate that was not satisfied under on_fail: skip). A ExecStep with ExecResult::NoOp is NOT an error — errors are reserved for authoring bugs (bad var expansion, exec shape invariants, hard predicate failure under on_fail: error).

Required Methods§

Source

fn name(&self) -> &'static str

Short stable identifier for the implementation. Used in logs / audit trails. Never rendered to end users as a translation key.

Source

fn execute( &self, action: &Action, ctx: &ExecCtx<'_>, ) -> Result<ExecStep, ExecError>

Execute a single Action against ctx.

§Errors

Returns ExecError on variable-expansion failure, invalid post- expansion paths, require predicates that fail with on_fail: error, or exec-shape invariant violations.

Implementors§