pub enum ContractRequirementTarget {
Value,
Members {
allow_integer: bool,
},
MembersMatchingPrefix {
prefix: String,
},
MembersWhereEquals {
guard_path: Vec<String>,
value: GuardValue,
target_path: Vec<String>,
},
MembersAt {
target_path: Vec<String>,
allow_integer: bool,
},
Keys,
}Expand description
Runtime value within a values-path contract that must satisfy a requirement.
Variants§
Value
The values path itself.
Members
Every value produced by ranging the path.
allow_integer describes the range header’s own integer lane. It is
false for a two-variable range, even when the member requirement would
otherwise accept integer values.
MembersMatchingPrefix
Values of object entries whose keys start with the literal prefix. Empty arrays and null remain valid because they execute no range body.
MembersWhereEquals
Each ranged member whose literal sibling equals value must satisfy
the requirements at target_path, both relative to that member.
Fields
value: GuardValueLiteral required at the selector path.
MembersAt
Every ranged member must CONTAIN target_path and its value there
must satisfy the requirements — an unconditional per-member field
read by a strict consumer (tpl $member.url fails on a missing or
non-string field). allow_integer mirrors Self::Members.
Fields
Keys
Every key produced by ranging the path.
Trait Implementations§
Source§impl Clone for ContractRequirementTarget
impl Clone for ContractRequirementTarget
Source§fn clone(&self) -> ContractRequirementTarget
fn clone(&self) -> ContractRequirementTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more