pub fn parse(
body: &[u8],
places: &[Place],
) -> Result<Vec<Elevation>, ElevationError>Expand description
Reads an answer of the elevation API for places: each place’s height, m above mean sea level
(the EGM2008 geoid), in the order asked.
§Errors
ElevationError::Json when the body is not JSON; ElevationError::Server for Open-Meteo’s
error answer; ElevationError::Missing when elevation is not an array of numbers;
ElevationError::Count when it holds another number of heights than places;
ElevationError::OutOfRange for a height outside HEIGHT_RANGE_M.