pub fn add<S>(&mut self, word: S)
    where
        S: Into<String>,
    {
        let word = word.into();
        let digits = digits_for(&word);
        let index = match self.root {
            Some(idx) => idx,
            None => {
                let idx = self.index_of_new_empty_node();
                self.root = Some(idx);
                idx
            }
        };

        self.add_at(index, digits, word);
    }
/// Add a word to the tree
///
/// This takes care of placing it in the right position in the tree.
Add a word to the tree
This takes care of placing it in the right position in the tree.
Add a word to the tree This takes care of placing it in the right position in the tree .
pub fn add<S>(&mut self, word: S)
    where
        S: Into<String>,
    {
        let word = word.into();
        let digits = digits_for(&word);
        let index = match self.root {
            Some(idx) => idx,
            None => {
                let idx = self.index_of_new_empty_node();
                self.root = Some(idx);
                idx
            }
        };
        self.add_at(index, digits, word);
    }
pub fn add < S > ( & mut self , word : S ) where S : Into < String > , { let word = word . into ( ) ; let digits = digits_for ( & word ) ; let index = match self . root { Some ( idx ) => idx , None => { let idx = self . index_of_new_empty_node ( ) ; self . root = Some ( idx ) ; idx } } ; self . add_at ( index , digits , word ) ; }
Add a word to the tree
This takes care of placing it in the right position in the tree.
Add a word to the tree This takes care of placing it in the right position in the tree .
&mut self
word
S
&mut self
word
S