Trait RuleExt

Source
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§

Source

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

Source

fn get_rule_weight(&'a self) -> i64

Get the weight of this rule. 0 if no weight is defined.

Source

fn get_filetypes(&'a self) -> Vec<&'a str>

Get a vector over the filetype metadata value. An empty Vec if not defined.

Implementations on Foreign Types§

Source§

impl RuleExt<'_> for Rule<'_>

Source§

fn get_metadata_value(&self, key: &str) -> Option<&MetadataValue<'_>>

Source§

fn get_filetypes(&self) -> Vec<&str>

Source§

fn get_rule_weight(&self) -> i64

Implementors§