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§

source

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

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§