Labeler

Trait Labeler 

Source
pub trait Labeler: Send + Sync {
    // Required methods
    fn applies_to(&self, kind: &str) -> bool;
    fn apply(&self, res: &mut Resource);
}

Required Methods§

Source

fn applies_to(&self, kind: &str) -> bool

e.g. “Host”, “Database::Table”; you can also support wildcard/globs if you want.

Source

fn apply(&self, res: &mut Resource)

Mutates the resource by injecting derived attributes (e.g., sets of labels)

Implementors§