pub trait RuleExt<'a> {
// Required methods
fn get_metadata_value(&'a self, key: &str) -> Option<&'a MetadataValue<'a>>;
fn get_rule_weight(&'a self) -> i64;
fn get_filetypes(&'a self) -> Vec<&'a str>;
}
Required Methods§
Sourcefn get_metadata_value(&'a self, key: &str) -> Option<&'a MetadataValue<'a>>
fn get_metadata_value(&'a self, key: &str) -> Option<&'a MetadataValue<'a>>
Get the value of a metadata by key. None
if that key/value pair doesn’t exist
Sourcefn get_rule_weight(&'a self) -> i64
fn get_rule_weight(&'a self) -> i64
Get the weight of this rule. 0
if no weight is defined.
Sourcefn get_filetypes(&'a self) -> Vec<&'a str>
fn get_filetypes(&'a self) -> Vec<&'a str>
Get a vector over the filetype
metadata value. An empty Vec if not defined.