CsvWriter.writeRow

CsvResult!bool writeRow(const FieldView[] fields)

Write a row given as an array of fields

CsvResult!bool writeRow(const string[] fields)

Convenience overload for string fields.

CsvResult!bool writeRow(T)(auto ref T t) if (isTuple!T)

Write a row from a std.typecons.Tuple of arbitrary values.

Each element is converted to text and emitted as a CSV field with quoting/escaping applied when necessary per the current dialect. Field order follows the tuple element order.

CsvResult!bool writeRow(T)(auto ref T s) if (isAggregateType!T && !isTuple!T && !isSomeString!T && !is(T == RowView))

Write a row from a user struct using field declaration order.

Reflection enumerates fields with T.tupleof; each field value is written as one CSV column. RowView is handled by a dedicated overload.

CsvResult!bool writeRow(RowView row)

Write a RowView directly by emitting its fields.

CsvResult!bool writeRow(Args...)(auto ref Args args) if (!(Args.length == 1 && (is(Args[0] == string[]) || is(Args[0] == const(string)[]) || is(Args[0] == FieldView[]) || is( Args[0] == RowView))))

Variadic overload to write a row from heterogeneous values.

Example:

writer.writeRow("id", 42, true);