actiondb/matcher/trie/
matcher.rs

1use matcher::Matcher;
2use super::SuffixTree;
3use matcher::result::MatchResult;
4use matcher::pattern::Pattern;
5use matcher::trie::node::interface::SuffixTree as STree;
6
7impl Matcher for SuffixTree {
8    fn parse<'a, 'b>(&'a self, text: &'b str) -> Option<MatchResult<'a, 'b>> {
9        self.parse(text)
10    }
11    fn add_pattern(&mut self, pattern: Pattern) {
12        self.insert(pattern);
13    }
14    fn boxed_clone(&self) -> Box<Matcher> {
15        Box::new(self.clone())
16    }
17}