pub fn parse(bytes: &[u8]) -> Result<Vec<Field<'_>>, Grib2Error>Expand description
Reads every field of a GRIB2 file.
The messages must follow one another with nothing between or after them, as the grib filter and NCEP write them.
§Errors
Grib2Error::NotGrib and Grib2Error::Edition when a message is not GRIB2,
Grib2Error::Truncated and Grib2Error::Malformed when one breaks the format, and
Grib2Error::Unsupported for a template or an option outside the module’s table.