Skip to main content

WeatherService

Struct WeatherService 

Source
pub struct WeatherService { /* private fields */ }

Implementations§

Source§

impl WeatherService

Source

pub const fn shared() -> Self

Source

pub const fn new() -> Self

Source

pub fn attribution(&self) -> Result<WeatherAttribution, WeatherKitError>

Source

pub fn weather(&self, location: &CLLocation) -> Result<Weather, WeatherKitError>

Source

pub fn current_weather( &self, location: &CLLocation, ) -> Result<CurrentWeather, WeatherKitError>

Source

pub fn hourly_forecast( &self, location: &CLLocation, ) -> Result<HourlyForecast, WeatherKitError>

Source

pub fn hourly_forecast_in( &self, location: &CLLocation, interval: DateInterval, ) -> Result<HourlyForecast, WeatherKitError>

Source

pub fn daily_forecast( &self, location: &CLLocation, ) -> Result<DailyForecast, WeatherKitError>

Source

pub fn daily_forecast_in( &self, location: &CLLocation, interval: DateInterval, ) -> Result<DailyForecast, WeatherKitError>

Source

pub fn minute_forecast( &self, location: &CLLocation, ) -> Result<Option<MinuteForecastCollection>, WeatherKitError>

Source

pub fn weather_alerts( &self, location: &CLLocation, ) -> Result<Vec<WeatherAlert>, WeatherKitError>

Source

pub fn availability( &self, location: &CLLocation, ) -> Result<WeatherAvailability, WeatherKitError>

Source

pub fn weather_including( &self, location: &CLLocation, query: WeatherQuery, ) -> Result<WeatherQueryResult, WeatherKitError>

Source

pub fn weather_including2( &self, location: &CLLocation, query1: WeatherQuery, query2: WeatherQuery, ) -> Result<(WeatherQueryResult, WeatherQueryResult), WeatherKitError>

Source

pub fn weather_including3( &self, location: &CLLocation, query1: WeatherQuery, query2: WeatherQuery, query3: WeatherQuery, ) -> Result<(WeatherQueryResult, WeatherQueryResult, WeatherQueryResult), WeatherKitError>

Source

pub fn weather_including4( &self, location: &CLLocation, query1: WeatherQuery, query2: WeatherQuery, query3: WeatherQuery, query4: WeatherQuery, ) -> Result<(WeatherQueryResult, WeatherQueryResult, WeatherQueryResult, WeatherQueryResult), WeatherKitError>

Source

pub fn weather_including5( &self, location: &CLLocation, query1: WeatherQuery, query2: WeatherQuery, query3: WeatherQuery, query4: WeatherQuery, query5: WeatherQuery, ) -> Result<(WeatherQueryResult, WeatherQueryResult, WeatherQueryResult, WeatherQueryResult, WeatherQueryResult), WeatherKitError>

Source

pub fn weather_including6( &self, location: &CLLocation, query1: WeatherQuery, query2: WeatherQuery, query3: WeatherQuery, query4: WeatherQuery, query5: WeatherQuery, query6: WeatherQuery, ) -> Result<(WeatherQueryResult, WeatherQueryResult, WeatherQueryResult, WeatherQueryResult, WeatherQueryResult, WeatherQueryResult), WeatherKitError>

Source

pub fn weather_including_many<I>( &self, location: &CLLocation, queries: I, ) -> Result<Vec<WeatherQueryResult>, WeatherKitError>
where I: IntoIterator<Item = WeatherQuery>,

Source

pub fn weather_changes( &self, location: &CLLocation, ) -> Result<Option<WeatherChanges>, WeatherKitError>

Source

pub fn historical_comparisons( &self, location: &CLLocation, ) -> Result<Option<HistoricalComparisons>, WeatherKitError>

Source

pub fn daily_statistics( &self, location: &CLLocation, query: DailyWeatherStatisticsQuery, ) -> Result<DailyWeatherStatisticsResult, WeatherKitError>

Source

pub fn daily_statistics_in( &self, location: &CLLocation, interval: DateInterval, query: DailyWeatherStatisticsQuery, ) -> Result<DailyWeatherStatisticsResult, WeatherKitError>

Source

pub fn daily_statistics_between_days( &self, location: &CLLocation, start_day: i64, end_day: i64, query: DailyWeatherStatisticsQuery, ) -> Result<DailyWeatherStatisticsResult, WeatherKitError>

Source

pub fn daily_summary( &self, location: &CLLocation, query: DailyWeatherSummaryQuery, ) -> Result<DailyWeatherSummaryResult, WeatherKitError>

Source

pub fn daily_summary_in( &self, location: &CLLocation, interval: DateInterval, query: DailyWeatherSummaryQuery, ) -> Result<DailyWeatherSummaryResult, WeatherKitError>

Source

pub fn hourly_statistics( &self, location: &CLLocation, query: HourlyWeatherStatisticsQuery, ) -> Result<HourlyWeatherStatistics<HourTemperatureStatistics>, WeatherKitError>

Source

pub fn hourly_statistics_in( &self, location: &CLLocation, interval: DateInterval, query: HourlyWeatherStatisticsQuery, ) -> Result<HourlyWeatherStatistics<HourTemperatureStatistics>, WeatherKitError>

Source

pub fn hourly_statistics_between_hours( &self, location: &CLLocation, start_hour: i64, end_hour: i64, query: HourlyWeatherStatisticsQuery, ) -> Result<HourlyWeatherStatistics<HourTemperatureStatistics>, WeatherKitError>

Source

pub fn monthly_statistics( &self, location: &CLLocation, query: MonthlyWeatherStatisticsQuery, ) -> Result<MonthlyWeatherStatisticsResult, WeatherKitError>

Source

pub fn monthly_statistics_in( &self, location: &CLLocation, interval: DateInterval, query: MonthlyWeatherStatisticsQuery, ) -> Result<MonthlyWeatherStatisticsResult, WeatherKitError>

Source

pub fn monthly_statistics_between_months( &self, location: &CLLocation, start_month: i64, end_month: i64, query: MonthlyWeatherStatisticsQuery, ) -> Result<MonthlyWeatherStatisticsResult, WeatherKitError>

Source

pub fn sun_events( &self, location: &CLLocation, ) -> Result<SunEvents, WeatherKitError>

Source

pub fn moon_events( &self, location: &CLLocation, ) -> Result<MoonEvents, WeatherKitError>

Source

pub fn pressure( &self, location: &CLLocation, ) -> Result<Pressure, WeatherKitError>

Trait Implementations§

Source§

impl Clone for WeatherService

Source§

fn clone(&self) -> WeatherService

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WeatherService

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WeatherService

Source§

fn default() -> WeatherService

Returns the “default value” for a type. Read more
Source§

impl Copy for WeatherService

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.