pub enum PolicySimulationResultReason {
RuleAccepted,
RuleRejected,
NoRuleMatched,
NoRuleForOperation,
}Expand description
Why the operation got its action. Each value implies exactly one action.
Within a policy, a matching reject rule overrides any matching accept rule, regardless of rule order.
With accept: rule_accepted means matchedRule matched all of its criteria, its action is accept, and no reject rule in the same policy matched. no_rule_for_operation means no rule targeted the operation, so it was accepted by default.
With reject: rule_rejected means matchedRule matched all of its criteria and its action is reject, so the rejection is caused by the entire rule. no_rule_matched means at least one rule targeted the operation but none matched, so it was rejected by default; unmatchedRules shows the criterion that disqualified each one.
JSON schema
{
"description": "Why the operation got its `action`. Each value implies exactly one `action`.\nWithin a policy, a matching `reject` rule overrides any matching `accept` rule, regardless of rule order.\nWith `accept`: `rule_accepted` means `matchedRule` matched all of its criteria, its action is `accept`, and no `reject` rule in the same policy matched. `no_rule_for_operation` means no rule targeted the operation, so it was accepted by default.\nWith `reject`: `rule_rejected` means `matchedRule` matched all of its criteria and its action is `reject`, so the rejection is caused by the entire rule. `no_rule_matched` means at least one rule targeted the operation but none matched, so it was rejected by default; `unmatchedRules` shows the criterion that disqualified each one.",
"examples": [
"no_rule_matched"
],
"type": "string",
"enum": [
"rule_accepted",
"rule_rejected",
"no_rule_matched",
"no_rule_for_operation"
]
}Variants§
Trait Implementations§
Source§impl Clone for PolicySimulationResultReason
impl Clone for PolicySimulationResultReason
impl Copy for PolicySimulationResultReason
Source§impl Debug for PolicySimulationResultReason
impl Debug for PolicySimulationResultReason
Source§impl<'de> Deserialize<'de> for PolicySimulationResultReason
impl<'de> Deserialize<'de> for PolicySimulationResultReason
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>,
impl Eq for PolicySimulationResultReason
Source§impl From<&PolicySimulationResultReason> for PolicySimulationResultReason
impl From<&PolicySimulationResultReason> for PolicySimulationResultReason
Source§fn from(value: &PolicySimulationResultReason) -> Self
fn from(value: &PolicySimulationResultReason) -> Self
Source§impl Hash for PolicySimulationResultReason
impl Hash for PolicySimulationResultReason
Source§impl Ord for PolicySimulationResultReason
impl Ord for PolicySimulationResultReason
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for PolicySimulationResultReason
impl PartialOrd for PolicySimulationResultReason
impl StructuralPartialEq for PolicySimulationResultReason
Source§impl TryFrom<&String> for PolicySimulationResultReason
impl TryFrom<&String> for PolicySimulationResultReason
Source§type Error = ConversionError
type Error = ConversionError
Source§impl TryFrom<&str> for PolicySimulationResultReason
impl TryFrom<&str> for PolicySimulationResultReason
Source§type Error = ConversionError
type Error = ConversionError
Source§impl TryFrom<String> for PolicySimulationResultReason
impl TryFrom<String> for PolicySimulationResultReason
Source§type Error = ConversionError
type Error = ConversionError
Auto Trait Implementations§
impl Freeze for PolicySimulationResultReason
impl RefUnwindSafe for PolicySimulationResultReason
impl Send for PolicySimulationResultReason
impl Sync for PolicySimulationResultReason
impl Unpin for PolicySimulationResultReason
impl UnsafeUnpin for PolicySimulationResultReason
impl UnwindSafe for PolicySimulationResultReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.