I have been testing Rust to read 10000 files and store them in 700 Structs. So, I will have around 5000 * 700 * Vec<30000> in my code. When I ran the code, I got memory error which I think is reasonable. So, I commented this Vec and it is working as expected. However, I need this Vec
Is there any possibility to handle this by writing into disk or memory based on usage? More specifically, I will not be accessing it often, so it can be slow to read (preferably fast to write). One suggestion I thought about is to have my own fn which can dump this Vec to file and when I want I can load this file. I am not an expert in Rust, so not too keen to implement my own fn. I think experts here would have already have suggestions, so I would like to know whether there is any other alternatives? Maybe in standard Rust or in crates.io?