RustyCSV.parse_string/2 currently has an option-dependent return shape:
- default: returns rows
- headers: true: returns maps
- input too large: returns {:error, :input_too_large}
- invalid options: raises ArgumentError
This is intentional for compatibility and ergonomics, but it matches Elixir's "alternative return types" design anti-pattern and makes the public contract harder to reason about.
For 0.4.0, consider introducing explicit APIs with stable return shapes, for example:
- parse_rows_string/2
- parse_maps_string/2
- parse_string!/2
- parse_maps_string!/2
Then decide whether to deprecate or change the headers: option behavior.
This should not be changed in a 0.3.x patch release because changing parse_string/2 directly would be breaking.
RustyCSV.parse_string/2 currently has an option-dependent return shape:
This is intentional for compatibility and ergonomics, but it matches Elixir's "alternative return types" design anti-pattern and makes the public contract harder to reason about.
For 0.4.0, consider introducing explicit APIs with stable return shapes, for example:
Then decide whether to deprecate or change the headers: option behavior.
This should not be changed in a 0.3.x patch release because changing parse_string/2 directly would be breaking.