Struct simple_trie::Trie [−][src]
Fields
nodes: Vec<Node>
synonym_dict: Vec<Vec<String>>
Implementations
impl Trie
[src]
pub fn new() -> Trie
[src]
pub fn insert(&mut self, string: &str, val: Option<u32>)
[src]
pub fn insert_synonym(&mut self, string: &str, synonyms: Vec<String>)
[src]
pub fn search(&self, string: &str) -> Option<u32>
[src]
pub fn longest_common_prefix_search(&self, string: &str) -> Option<(u32, usize)>
[src]
pub fn common_prefix_search(&self, string: &str) -> Vec<(u32, usize)>
[src]
pub fn get_all_tokens(&self, input: &str) -> Vec<Token>
[src]
function that gets the highest scoring (sum of values) combination of tokens
Auto Trait Implementations
impl RefUnwindSafe for Trie
impl Send for Trie
impl Sync for Trie
impl Unpin for Trie
impl UnwindSafe for Trie
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,