pub struct PolicyRule {
pub name: String,
pub pointer: String,
pub op: RuleOperator,
pub value: Option<Value>,
pub values: Option<Vec<Value>>,
pub negate: bool,
pub level: RuleLevel,
pub message: Option<String>,
}Expand description
A single policy rule.
Fields§
§name: StringHuman-readable name for the rule.
pointer: StringJSON Pointer to the value to check (RFC 6901).
op: RuleOperatorComparison operator.
value: Option<Value>Single value for comparison (for >, <, ==, etc.).
values: Option<Vec<Value>>Multiple values for “in” operator.
negate: boolNegate the result (NOT).
level: RuleLevelRule severity level.
message: Option<String>Custom failure message.
Trait Implementations§
Source§impl Clone for PolicyRule
impl Clone for PolicyRule
Source§fn clone(&self) -> PolicyRule
fn clone(&self) -> PolicyRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolicyRule
impl Debug for PolicyRule
Source§impl<'de> Deserialize<'de> for PolicyRule
impl<'de> Deserialize<'de> for PolicyRule
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
Auto Trait Implementations§
impl Freeze for PolicyRule
impl RefUnwindSafe for PolicyRule
impl Send for PolicyRule
impl Sync for PolicyRule
impl Unpin for PolicyRule
impl UnsafeUnpin for PolicyRule
impl UnwindSafe for PolicyRule
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