read_twoda_auto

Function read_twoda_auto 

Source
pub fn read_twoda_auto<R: Read>(
    reader: &mut R,
    name_or_extension: &str,
) -> Result<TwoDa, TwoDaBinaryError>
Expand description

Auto-detects the format from file extension and reads accordingly.

Supported extensions (case-insensitive):

  • .2da, .bif, .mod, .erf, .rim (or unknown) -> binary 2DA
  • .csv -> CSV format
  • .json -> JSON format