Trait dragonfly_client_rs::exts::RuleExt
source · pub trait RuleExt<'a> {
// Required methods
fn get_metadata_value(&'a self, key: &str) -> Option<&'a MetadataValue<'_>>;
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<'_>>
fn get_metadata_value(&'a self, key: &str) -> Option<&'a MetadataValue<'_>>
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.