I’m trying to create a dictionary of English words in Rust. This dictionary will work through the command line. I want to save words in one file in the form of a structure:
pub struct Word {
title: String,
pronunciation: String,
part_of_speech: String,
form: String,
usage: String,
domain: String,
level: String,
guide: String,
definition: String,
example: Vec,
}
Next, I want it to be possible to search and get the necessary words from the file and update it. For example, the file contains the word “rust”, I enter “rust” into the command line and information about it is displayed.
I looked at a number of file formats (csv, json, yaml), but I don’t understand how to implement this in them. Moreover, there may be a more convenient file format for these purposes.