[][src]Struct openweather_async::openweather::OpenWeather

pub struct OpenWeather {
    pub api_key: String,
    pub units: Units,
}

Fields

api_key: Stringunits: Units

Implementations

impl OpenWeather[src]

pub async fn new<'_>(
    api_key: &'_ str,
    units: Units
) -> Result<OpenWeather, Box<dyn Error>>
[src]

pub async fn get_by_city<'_, '_>(
    &'_ self,
    city: &'_ str
) -> Result<Weather, Box<dyn Error>>
[src]

pub async fn get_by_city_and_country<'_, '_, '_>(
    &'_ self,
    city: &'_ str,
    country: &'_ str
) -> Result<Weather, Box<dyn Error>>
[src]

pub async fn get_by_coordinates<'_>(
    &'_ self,
    lat: f32,
    lon: f32
) -> Result<Weather, Box<dyn Error>>
[src]

pub async fn get_by_zipcode<'_, '_>(
    &'_ self,
    zipcode: u32,
    country: &'_ str
) -> Result<Weather, Box<dyn Error>>
[src]

pub async fn get_by_cities_in_zone<'_>(
    &'_ self,
    lon1: f32,
    lat1: f32,
    lon2: f32,
    lat2: f32,
    zoom: u32
) -> Result<WeatherMultiple, Box<dyn Error>>
[src]

pub async fn get_by_cities_in_cycle<'_>(
    &'_ self,
    lon: f32,
    lat: f32,
    count: u32
) -> Result<WeatherMultiple, Box<dyn Error>>
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.