If you need to read or write a custom CSV format, like one that uses tabs instead of commas as a delimiter, you can use WriterBuilder and ReaderBuilder to customize the expected format. Remember this well if you're planning on using Microsoft Excel, as it has the annoying tendency to be regionally inconsistent in its choice of delimiters (https://stackoverflow.com/questions/10140999/csv-with-comma-or-semicolon).
This is also useful if a Windows application refuses to accept the terminator that csv uses as per default. In this case, simply specify the following code in the builder to use the Windows-native terminator:
.terminator(csv::Terminator::CRLF)
The csv crate allows you to manipulate your data much more than what is shown in this recipe. You can, for example, insert new fields on the fly into a StringRecord. We deliberately don't explore these possibilities in detail as the CSV format is not meant for these kinds of data manipulation. If you need to do more than simple import/export, you should use a more suitable format, such as JSON, which we will explore in this chapter as well.