#[non_exhaustive]pub struct ElevationRequest {
pub places: Vec<Place>,
pub endpoint: Option<String>,
}Expand description
What to ask Open-Meteo’s elevation API for: one place or up to MAX_PLACES.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.places: Vec<Place>The places, in the order their heights come back.
endpoint: Option<String>Another server’s endpoint in place of ENDPOINT, for a self-hosted Open-Meteo; None
for Open-Meteo’s own. It must hold no ? or #.
Implementations§
Source§impl ElevationRequest
impl ElevationRequest
Sourcepub fn url(&self) -> Result<String, ElevationError>
pub fn url(&self) -> Result<String, ElevationError>
The URL that asks for every place’s height: the latitudes, then the longitudes, each comma-separated in the places’ order and written to 5 decimals, trailing zeros dropped: 1e-5° is at most 1.1 m on the ground, far inside the DEM’s 90 m cells.
§Errors
ElevationError::Request when there are no places or more than MAX_PLACES, a place
is outside the range its doc gives (the value names the place’s index), or the endpoint is
empty or holds a ? or #.
Trait Implementations§
Source§impl Clone for ElevationRequest
impl Clone for ElevationRequest
Source§fn clone(&self) -> ElevationRequest
fn clone(&self) -> ElevationRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElevationRequest
impl Debug for ElevationRequest
Source§impl<'de> Deserialize<'de> for ElevationRequest
impl<'de> Deserialize<'de> for ElevationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ElevationRequest
impl PartialEq for ElevationRequest
Source§fn eq(&self, other: &ElevationRequest) -> bool
fn eq(&self, other: &ElevationRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ElevationRequest
impl Serialize for ElevationRequest
impl StructuralPartialEq for ElevationRequest
Auto Trait Implementations§
impl Freeze for ElevationRequest
impl RefUnwindSafe for ElevationRequest
impl Send for ElevationRequest
impl Sync for ElevationRequest
impl Unpin for ElevationRequest
impl UnsafeUnpin for ElevationRequest
impl UnwindSafe for ElevationRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more