#[non_exhaustive]pub struct WafExpressionSetExpression {
pub id: Option<String>,
pub sensitivity: Option<i32>,
/* private fields */
}Available on crate features
organization-security-policies or security-policies only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<String>Expression ID should uniquely identify the origin of the expression. E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set version 2.9.1 rule id 973337. The ID could be used to determine the individual attack definition that has been detected. It could also be used to exclude it from the policy in case of false positive. required
sensitivity: Option<i32>The sensitivity value associated with the WAF rule ID. This corresponds to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for opt-in only rules.
Implementations§
Source§impl WafExpressionSetExpression
impl WafExpressionSetExpression
pub fn new() -> Self
Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_sensitivity<T>(self, v: T) -> Self
pub fn set_sensitivity<T>(self, v: T) -> Self
Sets the value of sensitivity.
§Example
ⓘ
let x = WafExpressionSetExpression::new().set_sensitivity(42);Sourcepub fn set_or_clear_sensitivity<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_sensitivity<T>(self, v: Option<T>) -> Self
Sets or clears the value of sensitivity.
§Example
ⓘ
let x = WafExpressionSetExpression::new().set_or_clear_sensitivity(Some(42));
let x = WafExpressionSetExpression::new().set_or_clear_sensitivity(None::<i32>);Trait Implementations§
Source§impl Clone for WafExpressionSetExpression
impl Clone for WafExpressionSetExpression
Source§fn clone(&self) -> WafExpressionSetExpression
fn clone(&self) -> WafExpressionSetExpression
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 WafExpressionSetExpression
impl Debug for WafExpressionSetExpression
Source§impl Default for WafExpressionSetExpression
impl Default for WafExpressionSetExpression
Source§fn default() -> WafExpressionSetExpression
fn default() -> WafExpressionSetExpression
Returns the “default value” for a type. Read more
Source§impl Message for WafExpressionSetExpression
impl Message for WafExpressionSetExpression
impl StructuralPartialEq for WafExpressionSetExpression
Auto Trait Implementations§
impl Freeze for WafExpressionSetExpression
impl RefUnwindSafe for WafExpressionSetExpression
impl Send for WafExpressionSetExpression
impl Sync for WafExpressionSetExpression
impl Unpin for WafExpressionSetExpression
impl UnwindSafe for WafExpressionSetExpression
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