Skip to main content

ProfileRule

Trait ProfileRule 

Source
pub trait ProfileRule: Send + Sync {
    // Required method
    fn evaluate(&self, segments: &[Segment<'_>]) -> Option<ValidationIssue>;
}
Expand description

A profile rule that can be added to a ProfileRulePack.

Implement this trait to create reusable, composable profile rules for EDIFACT message validation.

Required Methods§

Source

fn evaluate(&self, segments: &[Segment<'_>]) -> Option<ValidationIssue>

Evaluate the rule against the given segments.

Return Some(issue) if the rule is violated, or None if the segments pass.

Implementors§