pub struct Rule(/* private fields */);Implementations§
Source§impl Rule
impl Rule
pub fn from_value(v: Value) -> Result<Rule>
pub fn into_value(self) -> Value
pub fn as_map(&self) -> &Map<String, Value>
pub fn as_map_mut(&mut self) -> &mut Map<String, Value>
Sourcepub fn rule_id(&self) -> Result<&str>
pub fn rule_id(&self) -> Result<&str>
The stable identity used for state matching.
from_value requires a string rule_id, but transparent Deserialize
and as_map_mut can bypass that validation. Return an error rather than
silently matching the wrong remote rule.
pub fn name(&self) -> &str
pub fn rule_type(&self) -> &str
pub fn severity(&self) -> &str
pub fn enabled(&self) -> bool
pub fn risk_score(&self) -> i64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
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
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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