Skip to main content

DecisionNode

Trait DecisionNode 

Source
pub trait DecisionNode: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn decide(
        &self,
        command: &CommandEnvelope,
        context: &dyn RuntimeContext,
    ) -> RuntimeResult<DecisionOutcome>;
}
Expand description

Policy decision node contract.

Required Methods§

Source

fn name(&self) -> &str

Returns the stable policy node name.

Source

fn decide( &self, command: &CommandEnvelope, context: &dyn RuntimeContext, ) -> RuntimeResult<DecisionOutcome>

Evaluates one command without mutating Runtime infrastructure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§