pub enum Predicate {
CountAtLeast {
key: String,
min: usize,
},
CountAtMost {
key: String,
max: usize,
},
ContentMustNotContain {
key: String,
forbidden: Vec<ForbiddenTerm>,
},
ContentMustContain {
key: String,
required_field: String,
},
CrossReference {
source_key: String,
target_key: String,
},
HasFacts {
key: String,
},
RequiredFields {
key: String,
fields: Vec<FieldRequirement>,
},
Custom {
description: String,
},
}Expand description
A semantic predicate extracted from Gherkin steps.
Represents the testable assertion that an invariant checks. Each variant maps to a code pattern in the generated Rust check.
Variants§
CountAtLeast
“the Context key X contains at least N facts”
CountAtMost
“the Context key X contains at most N facts”
ContentMustNotContain
“it must not contain any forbidden term” (with table of terms)
ContentMustContain
“it must include field X with a non-empty value”
CrossReference
“for each X fact there exists a Y fact referencing it”
HasFacts
“any fact under key X” / “facts exist under key X”
RequiredFields
“must include” with a table of required fields
Custom
Unrecognized step — preserved for downstream handling.
Trait Implementations§
impl StructuralPartialEq for Predicate
Auto Trait Implementations§
impl Freeze for Predicate
impl RefUnwindSafe for Predicate
impl Send for Predicate
impl Sync for Predicate
impl Unpin for Predicate
impl UnsafeUnpin for Predicate
impl UnwindSafe for Predicate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more