pub struct MatchedPolicyRule {
pub observations: Vec<PolicyCriterionObservation>,
pub policy: EvaluatedPolicy,
pub rule: Rule,
pub rule_index: u64,
}Expand description
The rule whose action decided the evaluation.
JSON schema
{
"description": "The rule whose action decided the evaluation.",
"examples": [
{
"observations": [
{
"ethValue": "2500000000000000000",
"type": "ethValue"
}
],
"policy": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"scope": "project",
"updatedAt": "2026-09-01T12:00:00Z"
},
"rule": {
"action": "reject",
"criteria": [
{
"ethValue": "1000000000000000000",
"operator": ">",
"type": "ethValue"
}
],
"operation": "signEvmTransaction"
},
"ruleIndex": 1
}
],
"type": "object",
"required": [
"policy",
"rule",
"ruleIndex"
],
"properties": {
"observations": {
"description": "The value each criterion was compared against, index-aligned with `rule.criteria`: `observations[i]` belongs to `rule.criteria[i]` and has the same `type`. Either every criterion has an entry or the field is omitted. Empty when the rule has no criteria.",
"type": "array",
"items": {
"$ref": "#/components/schemas/PolicyCriterionObservation"
}
},
"policy": {
"$ref": "#/components/schemas/EvaluatedPolicy"
},
"rule": {
"description": "The full rule as defined at the evaluated policy version (`policy.updatedAt`).",
"allOf": [
{
"$ref": "#/components/schemas/Rule"
}
]
},
"ruleIndex": {
"description": "Zero-based index into the policy's `rules`.",
"examples": [
1
],
"type": "integer",
"minimum": 0.0
}
}
}Fields§
§observations: Vec<PolicyCriterionObservation>The value each criterion was compared against, index-aligned with rule.criteria: observations[i] belongs to rule.criteria[i] and has the same type. Either every criterion has an entry or the field is omitted. Empty when the rule has no criteria.
policy: EvaluatedPolicy§rule: RuleThe full rule as defined at the evaluated policy version (policy.updatedAt).
rule_index: u64Zero-based index into the policy’s rules.
Implementations§
Source§impl MatchedPolicyRule
impl MatchedPolicyRule
pub fn builder() -> MatchedPolicyRule
Trait Implementations§
Source§impl Clone for MatchedPolicyRule
impl Clone for MatchedPolicyRule
Source§impl Debug for MatchedPolicyRule
impl Debug for MatchedPolicyRule
Source§impl<'de> Deserialize<'de> for MatchedPolicyRule
impl<'de> Deserialize<'de> for MatchedPolicyRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&MatchedPolicyRule> for MatchedPolicyRule
impl From<&MatchedPolicyRule> for MatchedPolicyRule
Source§fn from(value: &MatchedPolicyRule) -> Self
fn from(value: &MatchedPolicyRule) -> Self
Converts to this type from the input type.
Source§impl From<MatchedPolicyRule> for MatchedPolicyRule
impl From<MatchedPolicyRule> for MatchedPolicyRule
Source§fn from(value: MatchedPolicyRule) -> Self
fn from(value: MatchedPolicyRule) -> Self
Converts to this type from the input type.
Source§impl Serialize for MatchedPolicyRule
impl Serialize for MatchedPolicyRule
Source§impl TryFrom<MatchedPolicyRule> for MatchedPolicyRule
impl TryFrom<MatchedPolicyRule> for MatchedPolicyRule
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: MatchedPolicyRule) -> Result<Self, ConversionError>
fn try_from(value: MatchedPolicyRule) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for MatchedPolicyRule
impl RefUnwindSafe for MatchedPolicyRule
impl Send for MatchedPolicyRule
impl Sync for MatchedPolicyRule
impl Unpin for MatchedPolicyRule
impl UnsafeUnpin for MatchedPolicyRule
impl UnwindSafe for MatchedPolicyRule
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