Crate search_autocompletion[−][src]
A Rust implementation of Search Auto Completion
Examples
use search_autocompletion::AutoComplete; let mut com = AutoComplete::default(); com.insert(&("Hello", 9)); com.insert(&("Hell", 10)); com.insert(&("Ham", 1000)); com.insert(&("Hen", 54)); let strings = com.get_strings_for_prefix("He").unwrap(); assert_eq!(strings, vec!["Hen", "Hell", "Hello"]);
Structs
AutoComplete | The |