actiondb 0.7.0

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

impl Matcher for SuffixTree {
    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())
    }
}