Struct openweather_sdk::AirPollution
source · pub struct AirPollution { /* private fields */ }
Implementations§
source§impl AirPollution
impl AirPollution
pub fn new(api_key: String) -> Self
pub async fn get_current_air_pollution( &self, lat: f64, lon: f64 ) -> Result<AirPollutionResponse, Box<dyn Error>>
pub async fn get_forecast_air_pollution( &self, lat: f64, lon: f64 ) -> Result<AirPollutionResponse, Box<dyn Error>>
pub async fn get_historical_air_pollution( &self, lat: f64, lon: f64, start: u64, end: u64 ) -> Result<AirPollutionResponse, Box<dyn Error>>
Trait Implementations§
source§impl Clone for AirPollution
impl Clone for AirPollution
source§fn clone(&self) -> AirPollution
fn clone(&self) -> AirPollution
Returns a copy of the value. Read more
1.0.0 · 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 AirPollution
impl Debug for AirPollution
source§impl Default for AirPollution
impl Default for AirPollution
source§fn default() -> AirPollution
fn default() -> AirPollution
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for AirPollution
impl<'de> Deserialize<'de> for AirPollution
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 Display for AirPollution
impl Display for AirPollution
source§impl Hash for AirPollution
impl Hash for AirPollution
source§impl Ord for AirPollution
impl Ord for AirPollution
source§fn cmp(&self, other: &AirPollution) -> Ordering
fn cmp(&self, other: &AirPollution) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for AirPollution
impl PartialEq for AirPollution
source§fn eq(&self, other: &AirPollution) -> bool
fn eq(&self, other: &AirPollution) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AirPollution
impl PartialOrd for AirPollution
source§fn partial_cmp(&self, other: &AirPollution) -> Option<Ordering>
fn partial_cmp(&self, other: &AirPollution) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for AirPollution
impl Serialize for AirPollution
impl Eq for AirPollution
impl StructuralPartialEq for AirPollution
Auto Trait Implementations§
impl RefUnwindSafe for AirPollution
impl Send for AirPollution
impl Sync for AirPollution
impl Unpin for AirPollution
impl UnwindSafe for AirPollution
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.