Collection

Trait Collection 

Source
pub trait Collection: Send + Sync {
    // Required methods
    fn all(&self) -> Vec<(&str, &str)>;
    fn get(&self, key: &str) -> Option<Vec<&str>>;
    fn get_regex(&self, pattern: &Regex) -> Vec<(&str, &str)>;
    fn count(&self) -> usize;
    fn count_key(&self, key: &str) -> usize;
}
Expand description

A collection of key-value pairs.

Required Methods§

Source

fn all(&self) -> Vec<(&str, &str)>

Get all key-value pairs.

Source

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

Get values by key.

Source

fn get_regex(&self, pattern: &Regex) -> Vec<(&str, &str)>

Get values matching a regex pattern.

Source

fn count(&self) -> usize

Count items.

Source

fn count_key(&self, key: &str) -> usize

Count items with specific key.

Implementors§