Function process_file

Source
pub fn process_file(
    path: String,
    soil: SoilType,
) -> Result<Vec<(NaiveDateTime, f64, f64, f64)>>
Expand description

Read <path>, compute VWC for soil, return (datetime, raw, temp, vwc).

§Errors

This function returns an error if:

  • The file at path cannot be opened or read
  • CSV parsing fails due to invalid format
  • DateTime parsing fails (expects format: “%Y.%m.%d %H:%M”)
  • Any field deserialization fails