pub trait ToCSV {
    fn csv_headers(&self) -> Vec<CSVField>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn to_csv_record(&self) -> Vec<CSVField>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; }
Expand description

Describes how to save a list of this value as a CSV file.

It is done via two methods:

  1. self.csv_headers() gives the first row of the file, as a list of CSVField. For example, it can be time, score.
  2. 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

Serializes self as a list of CSVField. Each element in the vector must correspond to a header given by self.csv_headers()

Implementations on Foreign Types

Implementors