Crates.io | another_radix_trie |
lib.rs | another_radix_trie |
version | 0.1.4 |
source | src |
created_at | 2020-03-15 21:51:05.751334 |
updated_at | 2020-07-20 20:16:35.532423 |
description | Rust built radix tree library |
homepage | https://github.com/YaxinCheng/RadixTree |
repository | https://github.com/YaxinCheng/RadixTree |
max_upload_size | |
id | 219001 |
size | 25,602 |
Rust built radix tree with sorted vec
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")]