Skip to main content

PolicyEngineExt

Trait PolicyEngineExt 

Source
pub trait PolicyEngineExt: Send + Sync {
    // Required method
    fn check(&self, tx: &ParsedTx) -> Result<PolicyResult, PolicyError>;
}
Expand description

Trait for policy engines.

This trait is defined here to avoid circular dependencies. It mirrors the PolicyEngine trait from txgate-policy.

Required Methods§

Source

fn check(&self, tx: &ParsedTx) -> Result<PolicyResult, PolicyError>

Check if a transaction is allowed by policy rules.

§Errors

Returns PolicyError if policy evaluation fails.

Implementors§