package core.encoding.csv
CSV :: struct (Output_Type: type_expr) {
entries: [..] Output_Type;
}
Represents data from a CSV file of a particular type.
Methods
CSV.egress :: (csv: &CSV, writer: &Writer, include_headers) -> void
Outputs data from a CSV into a Writer. When include_headers
is true, the first line outputted will be the headers of the CSV, according to the CSV_Column tag information.
CSV.ingress :: (csv: &CSV, reader: &Reader, headers_present) -> bool
Ingests data from a Reader containing CSV data. Uses the type of the CSV to know what columns should be expectd.
CSV.ingress_string :: (csv: &CSV, contents: [] u8, headers_present) -> bool
Ingests data from a string representing CSV data. Uses the type of the CSV to know what columns should be expected. If headers_presents
is true, the first line will be treated as headers, and cross checked with the CSV_Column tag information. Use this when the columns from your CSV have a different order from the order of fields in the structure.