Commit Graph

5 Commits

Author SHA1 Message Date
Paul van Tilburg 69ef08002c
Introduce error types, switch to Results everywhere
* Add dependency on the `thiserror` crate
* Add a global `Error` type, but also `maps::Error` and
  `providers::combined::MergeError` for convenience
* Add matching `Result` types that default to the respective `Error`
  type
* Refactor code to yield all kinds of error variants
* Add FIXMEs where library errors still need to be handled
* Remove documentation that explained why `None` was returned, this is
  captured in the error now
2022-06-06 15:37:54 +02:00
Paul van Tilburg 46531a76bd Add retrieval of pollen and UVI metrics for Buienradar provider 2022-02-19 15:33:00 +01:00
Paul van Tilburg 7d1a1a1c0d Add helper methods that calculate lat/lon in radians 2022-02-18 22:58:39 +01:00
Paul van Tilburg 6b62cc7797 Add some unimplemented API for map project and sampling
* Add map reference point constants `*_MAP_REF_POINTS `that can be used
  for map projections
* Add (unimplemented )`*_project` and `*_sample` methods to the `Maps`
  implementation
* Add `PollenSample` and `UviSample` structs
* Make `Position::new` const
2022-02-18 21:25:06 +01:00
Paul van Tilburg 3a48f234e9 Introduce the Position struct; add position module
* Use `Position` everywhere instead of latitude/longitude float values
* Implement `Partial`, `Eq` and `Hash` for `Position` so it can
  part of a cache key
* Drop the `cache_key` helper function
* Rename the `address_position` function to `resolve_address`
* Add methods on `Position` for formatting latitude/longitude with
  a given precision (used for URL parameters in providers)
2022-02-15 14:15:59 +01:00