Skip to main content

ValidatePort

Trait ValidatePort 

Source
pub trait ValidatePort: Send + Sync {
    // Required method
    fn validate(&self, input: &ValidateInput) -> ValidationResult;
}
Expand description

Trait for validators injected into the Validate stage.

Implement this in oris-evokernel (or another crate that does not form a circular dependency with oris-evolution) and pass an Arc<dyn ValidatePort> via StandardEvolutionPipeline::with_validate_port. The trait is synchronous; async implementations must block internally (same pattern as SandboxPort).

Required Methods§

Source

fn validate(&self, input: &ValidateInput) -> ValidationResult

Validate the mutation result and return a ValidationResult.

The pipeline falls back to a stub result when no validator is injected.

Implementors§