trie_tree/
lib.rs

1//! # trie_tree
2//!
3//! `trie_tree` is the trie lib for rust ,
4//!  which utilizes Rc and Refcell to implemented
5//! 
6//! # Examples
7//! 
8//! ## [Word Trie](trie/word/struct.WordTrie.html)
9//! 
10//! used for constructing word level trie
11//!
12//! ```
13//! let word_trie = trie_tree::trie::word::WordTrie::new();
14//! let seq = "你在干什么";
15//! let seq1 = "你在找什么";
16//! word_trie.insert_words(seq, "没干嘛");
17//! word_trie.insert_words(seq1, "是吗");
18//! println!("{:?}", word_trie);
19//! ```
20//! 
21//! ## [Node Trie](trie/basic/struct.Node.html)
22//! 
23//! used for constructing char level trie
24//! 
25//! ```
26//! let node = trie_tree::trie::basic::Node::new();
27//! let seq = vec!["你".to_string(), "我".to_string(), "他".to_string()];
28//! let seq1 = vec!["你".to_string(), "我".to_string()];
29//! Node::insert_seq(node.clone(), &seq, Leaf::End("intention".to_string()));
30//! let leaf = Node::get_leaf(node.clone(), &seq1);
31//! assert_ne!(leaf, Leaf::End("intention".to_string()));
32//! ```
33//! 
34//! ## [Trie trait](trie/basic/trait.Trie.html)
35//! the basic trie trait.
36//! you can implement your own trie structure based on this trait. 
37//! 
38//! 
39
40
41#[cfg(test)]
42mod tests;
43/// trie mod to implement the trie_tree
44pub mod trie;