5 releases
0.1.4 | Jul 20, 2020 |
---|---|
0.1.3 | Jun 23, 2020 |
0.1.2 | Jun 15, 2020 |
0.1.1 | Mar 16, 2020 |
0.1.0 | Mar 15, 2020 |
#2327 in Data structures
124 downloads per month
25KB
504 lines
another_radix_trie
Rust built radix tree with sorted vec
Example
Construct
use another_radix_trie::RadixTrie;
let mut trie = RadixTrie::<String>::new();
Insert
trie.insert("label", String::from("value"));
Find
trie.find("label");
// returns Some(&"value")
Find_mut
trie.find_mut("label");
// returns Some(&mut "value")
Remove
trie.remove("label");
// returns Some("value")
Start with
trie.insert("lab", "laboratory");
trie.insert("label", "label");
trie.starts_with("la");
// returns vec![("lab", &"laboratory"), ("label", &"label")]