pub fn insert(&mut self, word: impl IntoIterator<Item = C>) -> usize {
        let mut node = 0;

        for ch in word {
            let len = self.links.len();
            node = match self.links[node].entry(ch) {
                Entry::Occupied(entry) => *entry.get(),
                Entry::Vacant(entry) => {
                    entry.insert(len);
                    self.links.push(HashMap::new());
                    len
                }
            }
        }
        node
    }
/// Inserts a word into the trie, and returns the index of its node.
Inserts a word into the trie, and returns the index of its node.
Inserts a word into the trie and returns the index of its node .
pub fn insert(&mut self, word: impl IntoIterator<Item = C>) -> usize {
        let mut node = 0;
        for ch in word {
            let len = self.links.len();
            node = match self.links[node].entry(ch) {
                Entry::Occupied(entry) => *entry.get(),
                Entry::Vacant(entry) => {
                    entry.insert(len);
                    self.links.push(HashMap::new());
                    len
                }
            }
        }
        node
    }
pub fn insert ( & mut self , word : impl IntoIterator < Item = C > ) -> usize { let mut node = 0 ; for ch in word { let len = self . links . len ( ) ; node = match self . links [ node ] . entry ( ch ) { Entry :: Occupied ( entry ) => * entry . get ( ) , Entry :: Vacant ( entry ) => { entry . insert ( len ) ; self . links . push ( HashMap :: new ( ) ) ; len } } } node }
Inserts a word into the trie, and returns the index of its node.
Inserts a word into the trie and returns the index of its node .
&mut self
word
impl IntoIterator<Item = C>