Skip to main content

AttrSet

Trait AttrSet 

Source
pub trait AttrSet: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Option<&str>;
    fn get_list(&self, key: &str) -> Option<Vec<&str>>;

    // Provided methods
    fn has(&self, key: &str, value: &str) -> bool { ... }
    fn contains(&self, key: &str, value: &str) -> bool { ... }
}
Expand description

Attribute set trait - all objects implement this

Required Methods§

Source

fn get(&self, key: &str) -> Option<&str>

Get a single string attribute

Source

fn get_list(&self, key: &str) -> Option<Vec<&str>>

Get a list attribute

Provided Methods§

Source

fn has(&self, key: &str, value: &str) -> bool

Check if attribute equals value

Source

fn contains(&self, key: &str, value: &str) -> bool

Check if list attribute contains value

Implementors§