pub fn parse_formation_file<P: AsRef<Path>>(
path: P,
) -> ParseResult<Vec<UnitRecord>>Expand description
Parse a formation file directly
Convenience function that reads the file and parses it in one step.
§Examples
use shk_parser::parse_formation_file;
let units = parse_formation_file("my_formation.cas")?;
println!("Loaded {} units from formation", units.len());§Errors
Returns ParseError if the file cannot be read or contains invalid data.
See AttackSetupParser::parse_file for detailed error conditions.