Hi all,
I need to store a vector of string on disk. And I have to do this thing mulitiple times. So, to reduce the size of data on disk I have converted that vector of string into a Trie data structure (As I just need search operation not exact string).
This is my Trie data structure
pub struct TrieNode {
pub children: HashMap<u8, TrieNode>,
pub is_word: bool,
}
I was using SaveFile to do all the writing in disk. As it is highly performant and I need to write whole trie again and again after some time to disk .But its is giving me Error :
thread 'test_logic' has overflowed its stack
fatal runtime error: stack overflow
I know it has something to do with nested structure, Is there any way around thi problem?
Thanks for help