Trait fuzzcheck::ToCSV [−][src]
pub trait ToCSV {
fn csv_headers(&self) -> Vec<CSVField>ⓘ;
fn to_csv_record(&self) -> Vec<CSVField>ⓘ;
}
Expand description
Describes how to save a list of this value as a CSV file.
It is done via two methods:
- self.csv_headers() gives the first row of the file, as a list of CSVField.
For example, it can be
time, score
. - self.to_csv_record() serializes the value as a CSV row. For example, it
can be
16:07:32, 34.0
.
Note that each call to self.to_csv_record() must return a list of CSVField
where the field at index i
corresponds to the header at index i
given by self.csv_headers().
Otherwise, the CSV file will be invalid.
Required methods
The headers of the CSV file