pub struct RuleMetadata {
pub id: Option<String>,
pub msg: Option<String>,
pub logdata: Option<String>,
pub severity: Option<u8>,
pub tags: Vec<String>,
pub maturity: Option<u8>,
pub accuracy: Option<u8>,
pub rev: Option<String>,
pub ver: Option<String>,
}Expand description
Metadata from a rule.
Fields§
§id: Option<String>Rule ID.
msg: Option<String>Rule message.
logdata: Option<String>Log message.
severity: Option<u8>Severity (0-7).
Tags.
maturity: Option<u8>Maturity level.
accuracy: Option<u8>Accuracy level.
rev: Option<String>Revision.
ver: Option<String>Version.
Implementations§
Source§impl RuleMetadata
impl RuleMetadata
Sourcepub fn severity_level(&self) -> Option<Severity>
pub fn severity_level(&self) -> Option<Severity>
Get severity as enum.
Sourcepub fn format_log(&self) -> String
pub fn format_log(&self) -> String
Format as log message.
Trait Implementations§
Source§impl Clone for RuleMetadata
impl Clone for RuleMetadata
Source§fn clone(&self) -> RuleMetadata
fn clone(&self) -> RuleMetadata
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 RuleMetadata
impl Debug for RuleMetadata
Source§impl Default for RuleMetadata
impl Default for RuleMetadata
Source§fn default() -> RuleMetadata
fn default() -> RuleMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuleMetadata
impl RefUnwindSafe for RuleMetadata
impl Send for RuleMetadata
impl Sync for RuleMetadata
impl Unpin for RuleMetadata
impl UnwindSafe for RuleMetadata
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