pub fn fetch<T: Transport>(
client: &Client<T>,
request: &ElevationRequest,
now_s: u64,
) -> Result<(Vec<Elevation>, Fetched), ElevationError>Expand description
Fetches request through client and reads each place’s height above mean sea level.
The answer comes from the client’s cache while fresh (see ElevationRequest::source);
offline, from the cache only. The Fetched says which, carries ATTRIBUTION and holds the
body. Only an answer that parse reads is cached (Client::fetch_checked): one that
doesn’t never takes a good copy’s place, and online a stale good copy is returned instead, with
the reason.
§Errors
ElevationError::Request for a bad request; ElevationError::Net when the fetch fails,
or with NetError::Refused naming what parse refused when the only answer there is
doesn’t parse.