actiondb 0.3.0

A safe and efficient unstructured text (log) parsing library.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use matcher::Matcher;
use super::ParserTrie;
use matcher::result::MatchResult;
use matcher::pattern::Pattern;

impl Matcher for ParserTrie {
    fn parse<'a, 'b>(&'a self, text: &'b str) -> Option<MatchResult<'a, 'b>> {
        self.parse(text)
    }
    fn add_pattern(&mut self, pattern: Pattern) {
        self.insert(pattern);
    }
    fn boxed_clone(&self) -> Box<Matcher> {
        Box::new(self.clone())
    }
}